Skip to content

Instantly share code, notes, and snippets.

View yannick's full-sized avatar
🏗️

Yannick Koechlin yannick

🏗️
View GitHub Profile
package main
import (
"bufio"
"bytes"
"compress/gzip"
"fmt"
"github.com/mitchellh/goamz/aws"
"github.com/mitchellh/goamz/s3"
"io"
#!/usr/bin/env bash
# ~/.osx — https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@yannick
yannick / gist:4c2427b13390296f5978
Created April 9, 2015 09:11
salt-cloud profile
small:
provider: aws-frankfurt
image: ami-m1am1
size: t2.small
ssh_username: root
script: bootstrap-salt
script_args: -F -D -L -A saltmaster.my.domain -i
tag: {'Environment': 'production', 'Role': 'generic'}
sync_after_install: all
block_device_mappings:
import std.stdio;
import vibe.http.client;
import vibe.stream.operations : readAllUTF8;
import vibe.http.common : HTTPMethod;
import vibe.core.concurrency;
import vibe.core.core;
import std.datetime;
shared static Task dbTask;
require "json"
File.each_line("/dev/stdin") do |line|
pull = JSON::PullParser.new(line)
pull.on_key!("meta") do
pull.on_key!("timestamp") do
puts pull.read_int
end
end
end
import std.stdio;
//import std.format;
import std.container.rbtree : RedBlackTree;
struct MyStruct
{
long id;
alias id this;
import vibe.d;
import std.format : format;
import core.atomic : atomicOp;
import std.stdio;
shared int serial;
shared shared(Log)*[int] logstore;
shared struct Log
module x;
import vibe.d;
import std.format : format;
import core.atomic : atomicOp;
import std.stdio;
import routes;
Process: bug-shared [24451]
Path: /Users/USER/*/bug-shared
Identifier: bug-shared
Version: 0
Code Type: X86-64 (Native)
Parent Process: dub [24431]
Responsible: Terminal [498]
User ID: 501
Date/Time: 2015-04-27 17:27:37.344 +0200
import std.stdio;
import std.container.dlist;
void main()
{
auto dl = DList!string();
dl.insertBack("eins");
dl.insertBack("zwei");