Skip to content

Instantly share code, notes, and snippets.

View LudgerPeters's full-sized avatar

Ludger Peters LudgerPeters

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ludgerpeters on github.
  • I am ludjer (https://keybase.io/ludjer) on keybase.
  • I have a public key ASB-WKvyhbaVYRsYbA0GIQL6Fo7pl0lpW8kVGJPgTmQhqwo

To claim this, I am signing this object:

@LudgerPeters
LudgerPeters / StratergyPattern.java
Created September 25, 2019 00:59
StratergyPattern.java
import java.util.ArrayList;
interface BillingStrategy {
// Use a price in cents to avoid floating point round-off error
int getActPrice(int rawPrice);
}
class NormalBillingStratergy implements BillingStrategy{
@Override
public int getActPrice(int rawPrice) {
import { Component, OnDestroy } from '@angular/core';
import { NoteCard, NoteCreator} from '../ui';
import { NoteService } from '../services';
import { Store } from '../store';
import 'rxjs/Rx';
import {Subscription} from 'rxjs/Rx';
@Component ({
selector: "notes-container",
@LudgerPeters
LudgerPeters / AnnotationProcessor.java
Last active March 4, 2016 11:14
Annotation Processor causing javac to not return the correct error codes
package com.test;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.element.TypeElement;
import javax.lang.model.SourceVersion;
var restApi = Restangular.all('/rest/api/location');
var newObject = {name: "myObject"};//generate object here
// POST /rest/api/location
restApi.post(object);
@LudgerPeters
LudgerPeters / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
public class index extends com.fizzed.rocker.runtime.DefaultRockerTemplate<index> {
// <!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>
static private final byte[] PLAIN_TEXT_0_0;
// </title>\n <link rel='stylesheet' href='
static private final byte[] PLAIN_TEXT_1_0;
// '>\n <link rel='stylesheet' href='
static private final byte[] PLAIN_TEXT_2_0;
// '>\n</head>\n<body>\nHi!\n<a href='
static private final byte[] PLAIN_TEXT_3_0;
@LudgerPeters
LudgerPeters / index.rocker.html
Last active August 29, 2015 14:19
ApplicationController/index.rocker.html
@import controllers.ApplicationController
@args (String title)
<!DOCTYPE html>
<html lang="en">
<head>
<title>@title</title>
<link rel='stylesheet' href='@N.webJarsAt("bootstrap/3.3.2-1/css/bootstrap.min.css")'>
<link rel='stylesheet' href='@N.assetsAt("css/app.css")'>