This file contains hidden or 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 main | |
import ( | |
"bytes" | |
"fmt" | |
"math" | |
"os" | |
"os/signal" | |
"runtime" | |
"runtime/pprof" |
This file contains hidden or 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 main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"reflect" | |
"time" | |
tb "github.com/tigerbeetle/tigerbeetle-go" |
This file contains hidden or 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
for f in `find . -name "*.go" | xargs grep -l "<OLD>"`; do sed -i -e 's/<OLD>/<NEW>/g' $f; done |
This file contains hidden or 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
CREATE TABLE locations | |
( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
loc_id INT NOT NULL, | |
zip VARCHAR(10) NOT NULL, | |
location_name VARCHAR(255) NOT NULL, | |
region VARCHAR(255) NOT NULL, | |
lat DOUBLE NOT NULL, | |
lon DOUBLE NOT NULL | |
) ENGINE = InnoDB; |
This file contains hidden or 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
SELECT | |
dest.zc_loc_id AS ID, | |
dest.zc_zip AS PLZ, | |
dest.zc_location_name AS ORT, | |
ACOS( | |
SIN(RADIANS(src.zc_lat)) * SIN(RADIANS(dest.zc_lat)) | |
+ COS(RADIANS(src.zc_lat)) * COS(RADIANS(dest.zc_lat)) | |
* COS(RADIANS(src.zc_lon) - RADIANS(dest.zc_lon)) | |
) * 6380 AS Entfernung, | |
t5.text_val AS Bundesland |
This file contains hidden or 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
SELECT | |
t1.loc_id, t1.text_val AS Ort, t2.text_val AS PLZ, t5.text_val AS Bundesland | |
FROM geodb_textdata t1, geodb_textdata t2, geodb_textdata t3, geodb_textdata t4, geodb_textdata t5 | |
WHERE t2.text_val = '08060' | |
AND t1.loc_id = t2.loc_id | |
AND t2.text_type = '500300000' /* PLZ */ | |
AND t3.loc_id = t1.loc_id | |
AND t3.text_type = '500600000' /* Amtlicher Gemeindeschlüsssel */ | |
AND t4.text_type = '500600000' | |
AND t4.text_val = SUBSTR(t3.text_val,1,2) |
This file contains hidden or 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
#!/bin/bash | |
go build -installsuffix netgo -tags netgo -a -ldflags "-s -X main.version=${VERDSION}" |
This file contains hidden or 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
/** @jsx React.DOM */ | |
var React = require('react'); | |
var Ausgabe = React.createClass({ | |
getInitialState: function() { | |
return { | |
gefaelltmir: false | |
}; | |
}, | |
handleClick: function(e) { |
This file contains hidden or 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
-- 2177452800000000 = diff from 01.01.1970 00:00:00.000000 to 01.01.1901 00:00:00.000000 | |
select timestamp '1970-01-01 00:00:00' + numtodsinterval((STAMP - 2177452800000000)/1000/1000,'SECOND') from DUAL; |
This file contains hidden or 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
mvn install:install-file -Dfile=phpunit-4.3.phar \ | |
-DgroupId=de.phpunit \ | |
-DartifactId=PHPUnit \ | |
-Dversion=4.3 \ | |
-Dpackaging=phar \ | |
-DgeneratePom=true \ | |
-DcreateChecksum=true \ | |
(-DlocalRepositoryPath=<path-to-repo>) |