Verifying that +elifarley is my blockchain ID. https://onename.com/elifarley
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
-- Monotonic function that returns a bigint representing a given datetime2. | |
CREATE FUNCTION dt2asbigint(@dt datetime2) RETURNS BIGINT WITH SCHEMABINDING AS | |
BEGIN | |
declare @twoAsBigInt bigint = 2 | |
declare @bytesInDate int = 3 | |
declare @bitsInTime int = 8 * (8 - @bytesInDate) | |
declare @bigdatetime binary(9) = cast(@dt as binary(9)) | |
declare @bigdate bigint = cast(reverse(substring(@bigdatetime, 7, @bytesInDate)) as binary(3)) |
I hereby claim:
- I am elifarley on github.
- I am elifarley (https://keybase.io/elifarley) on keybase.
- I have a public key whose fingerprint is BC7E 5B5D 4A0F A9EF ACB2 BC4F CE2A D059 C465 A677
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
package java.net; | |
public class GetLocalHostInfo { | |
public static InetAddressImpl impl; | |
public static void main( final String[] args ) { | |
try { | |
InetAddress.getLoopbackAddress(); |
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
<settingsSecurity> | |
<relocation>/Volumes/usb-key/settings-security.xml</relocation> | |
</settingsSecurity> |
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 org.ecc.numericnotation; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.nio.charset.Charset; | |
import java.util.Arrays; | |
/** | |
* |
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
# On remote server: | |
echo 'grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };' > /tmp/tools.policy | |
sudo -u jboss $JDK_HOME/bin/jstatd -J-Djava.rmi.server.hostname=$(hostname -i) -J-Djava.security.policy=/tmp/tools.policy | |
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
# Save this file as %USERPROFILE%\mercurial.ini or ~/.hgrc | |
[alias] | |
nudge = push --rev . | |
clean = clean --abort-on-err | |
cleana = clean --all | |
qic = !%HG% qimport -r .:: && %HG% qpop -a $@ | |
qfa = !%HG% qpush -a $@ && %HG% qfinish -a | |
metaimport = !%HG% export $@ | %HG% import --user "%HGUSER%" --bypass - | |
metaimportnc = !%HG% export $@ | %HG% import --user "%HGUSER%" --no-commit --similarity 50 - |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
> load('functions.js') | |
> db.stuff.drop() | |
false | |
> db.stuff.insert({value:1}) | |
> db.stuff.insert({value:2}) | |
> db.stuff.insert({value:2}) | |
> db.stuff.insert({value:2}) | |
> db.stuff.insert({value:3}) | |
> db.stuff.mapReduce(map, reduce, {finalize:finalize, out:{inline:1}}).results[0] | |
{ |
NewerOlder