Skip to content

Instantly share code, notes, and snippets.

View akleiber's full-sized avatar
:octocat:
Branching all day long!

Andreas Kleiber akleiber

:octocat:
Branching all day long!
View GitHub Profile
@akleiber
akleiber / LICENSE.txt
Created May 12, 2017 01:04 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@akleiber
akleiber / gist:215c64b93c22ee7131af96de039fbbc6
Created September 12, 2016 20:38
feed example image labels into tensorflow
https://github.com/tensorflow/models/blob/master/inception/inception/data/build_image_data.py
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.py
@akleiber
akleiber / sendsqs.js
Created June 8, 2016 19:39
AWS Lambda sample: Send received events to SQS as Message
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/{AWS_ACCUOUNT_}/matsuoy-lambda';
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region : 'us-east-1'});
exports.handler = function(event, context) {
var params = {
MessageBody: JSON.stringify(event),
QueueUrl: QUEUE_URL
};
sqs.sendMessage(params, function(err,data){
function foo(array $array) {
print_r($array);
}
foo('I am a string');
@akleiber
akleiber / docker-toolbox-custom-mount.md
Last active December 3, 2015 09:09
add a custom directory to mount in docker toolbox on osx

beware, this will be overwritten if you run! docker-machine regenerate-certs <vm-name>

choose a hostpath that suits your needs

VBoxManage sharedfolder add "default" --name "data" --hostpath "/your/host/path/" --automount
VBoxManage setextradata "default" VBoxInternal2/SharedFoldersEnableSymlinksCreate/data 1
docker-machine ssh default
require 'rest-client'
require 'JSON'
require 'date'
require 'uri'
class Graphite
def initialize(host)
@host = host
end