Skip to content

Instantly share code, notes, and snippets.

View yannick's full-sized avatar
🏗️

Yannick Koechlin yannick

🏗️
View GitHub Profile
@Laeeth
Laeeth / arsdlua.d
Last active October 5, 2015 20:17
very simplistic arsd terminal lua repl
/*
Basic idea is to create an inspector for exploring state of a D program from a console using Lua
to view and perhaps modify D state. You can then call this inspector either like a breakpoint by
just placing a call to it where you wish your code to stop, or implement something fancier so that
you can interrupt the code live from the debugging console or specify conditions that will lead to
a 'breakpoint'. (Perhaps annotate the functions that need to check if they need to call in to the
debugger, and conceivably have some kind of interprocess communication).
Also means you can log to a data structure rather than text file, and inspect the data structure in
a more precise and structured way via Lua
# size of the buffer for storing unread stream tuples
tuple_buffer_blocks = 256MB # 128MB
# synchronization level for combiner commits; off, local, remote_write, or on
continuous_query_combiner_synchronous_commit = off
# maximum amount of memory to use for combiner query executions
continuous_query_combiner_work_mem = 1024MB
# maximum memory to be used by the combiner for caching; this is independent
@lloeki
lloeki / arch-xhyve.sh
Created August 27, 2015 17:22
Run Arch Linux in xhyve
#!/bin/bash
tmp=$(mktemp -d)
pushd "$tmp"
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso
echo "fixing disk"
dd if=/dev/zero bs=2k count=1 of=tmp.iso
dd if=$iso bs=2k skip=1 >> tmp.iso
echo "mounting disk"
@aviflax
aviflax / lambda.go
Created July 14, 2015 19:49
Proof of concept for using Go with Lambda
// Package lambda helps create workers that run in AWS’ Lambda service.
// The Lambda service is designed to run Node.js programs, so we have a very thin
// Node.js wrapper which is essentially an adapter between our Go worker programs
// and Lambda. Lambda runs our Node.js wrapper/adapter which then in turn runs
// our Go worker programs as child processes, communicating with them via stdio pipes
// and Unix exit codes.
//
// The interaction between the Lambda wrapper and our Go programs works like this:
//
// * The Node.js function is invoked by Lambda. Lambda passes an `event` parameter to
@DraTeots
DraTeots / ComPort over Network.md
Last active March 28, 2025 05:04
ComPort over Network
@Noitidart
Noitidart / Beamoff Tool.iso
Last active October 20, 2022 12:21
Shows how to install OSX 10.10.1 onto Oracle VirtualBox on AMD
# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
require 'cherti/all'
include Cherti
def create_ad_url_override(user_id, ad_url, lang='ad')
device_types = ['mobile', 'tablet', 'pc']
device_types.each do |dt|
AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url)
end
end
require 'cherti/all'
include Cherti
def create_ad_url_override(user_id, ad_url, lang='ad')
device_types = ['mobile', 'tablet', 'pc']
device_types.each do |dt|
AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url)
end
end
@jkreps
jkreps / benchmark-commands.txt
Last active March 8, 2025 12:25
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196