yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }
scriptdir() { (cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd) }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.copperdays.snippets.applicationproperty.demo; | |
import javax.persistence.*; | |
@Entity | |
@Table(name = "APP_PROPS", schema = "DEMO") | |
public class ApplicationPropertyEntity { | |
@Id | |
@Column(name = "KEY") | |
private String key; |
Berlin and Kay also found that, in languages with fewer than the maximum eleven color categories, the colors found in these languages followed a specific evolutionary pattern. This pattern is as follows:
- All languages contain terms for black and white.
- If a language contains three terms, then it contains a term for red.
- If a language contains four terms, then it contains a term for either green or yellow (but not both).
- If a language contains five terms, then it contains terms for both green and yellow.
- If a language contains six terms, then it contains a term for blue.
- If a language contains seven terms, then it contains a term for brown.
- If a language contains eight or more terms, then it contains a term for purple, pink, orange, and/or gray.
I hereby claim:
- I am darrend on github.
- I am darrenbday (https://keybase.io/darrenbday) on keybase.
- I have a public key whose fingerprint is 0A46 46A2 65E1 6B72 1F09 3BD2 0605 E3A0 0911 2AF5
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class FlagArgumentsDemo { | |
public static void main(String[] args) { | |
System.out.println(convertToInteger("5")); | |
System.out.println(convertToInteger("5", Flag.DEBUG)); | |
System.out.println(convertToInteger("5", Flag.IGNORE_EXCEPTIONS, Flag.DEBUG)); | |
System.out.println(convertToInteger("no number", Flag.IGNORE_EXCEPTIONS, Flag.DEBUG)); | |
System.out.println(convertToInteger("no number", Flag.IGNORE_EXCEPTIONS)); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -e | grep "mosh-server" | grep -v "^$PPID" | awk '{print $1}' | xargs -r --verbose kill -TERM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package scripts.rest | |
def values = [:] | |
params.each { name, value -> values[name] = value } | |
headers.each { name, value -> values[name] = value } | |
cookies.each { name, value -> values[name] = value } | |
sessionAttributes.each { name, value -> values[name] = value } | |
return values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_fragments = 0 | |
counter = lambda { num_fragments += 1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Darren Day | |
*/ | |
function handleResponse(data) { | |
var source = $("#template").html(); | |
var template = Handlebars.compile(source); | |
var result = template({ | |
"links": data | |
}); | |
$("#main").append(result); |
NewerOlder