Skip to content

Instantly share code, notes, and snippets.

Is UTF8 string valid?

Mix.install([:benchee, :benchee_markdown])

Section

defmodule BulkMatch32 do

Is UTF8 string valid?

Mix.install([:benchee, :benchee_markdown])

Section

defmodule BulkMatch32 do

Benchmark map/struct access syntaxes

Mix.install([
  {:benchee_dsl, "~> 0.5"}
  # {:benchee_markdown, "~> 0.3"}
])

Section

Bandit.HTTP1.Adapter.read/5 benchmark

Mix.install([
  {:benchee_dsl, "~> 0.5"}
  # {:benchee_markdown, "~> 0.3"}
])

Section

#include <stdint.h>
#include "algos_number.h"
void* algos_number_alloc(algos_number_kind kind, void* value) {
algos_number *number = (algos_number*)enif_alloc(sizeof(algos_number));
if (number == NULL) {
exit(1);
}
@asakura
asakura / gist:294c6612a3b86adc8a20
Created February 11, 2015 18:02
dnsmasq for docker, static address for lxc
sudo -i
service docker stop
lxc-stop -n conjur-standalone-01
service lxc-net stop
service lxc stop
# Delete old bridges
ip link set dev docker0 down
brctl delbr docker0
# Prepare your host machine
```sh-session
sudo apt-get install -y python-software-properties
sudo apt-add-repository -y ppa:ubuntu-lxc/stable
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y lxc
sudo modprobe ip6table_filter
```
# ---- RUN ON HOST
sudo apt-get install -y python-software-properties
sudo apt-add-repository -y ppa:ubuntu-lxc/stable
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y lxc
sudo lxc-create -t ubuntu -n conjur-baseimage -- -r precise
# fstab
@asakura
asakura / user-data
Created December 19, 2014 14:25
user-data example
#cloud-config
manage_etc_hosts: localhost
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCcKhUGgzZTycTHQPjfd12MeSaFYl2pomE0pvzJuQVBJHAdMg0mTLphtAA7jUVp1mMaLXhONVZMTqyy9Jkb0lhZK6wzDC+MwyqB543Q/umHpRccULOWfjvB0S33ZA6414287kshqbH4tfkQ5+2lJitj2FDUIck9BPwUBSvOeyDsOuU6PeCY8qD2czvKk2QN96h2SngibuQ+ty7nLdqIGedAojevKk9YwtopTRey3Xxe4g++Ew4Jc40jH9oY0KHVS0vIVeKkpJow7W4xmS5zviMfdejjhmirDErpYP6DqIJwl0wlBn/D/ghoWgYfUzuBjUBQ+sHZRQ+mgUW3ZTaHdzBgwVLKuzckCovdq6fA3wL+x3rexR1avhR/AxnMmc4hFc5/TGhqTs9oRKRwo7A6wrufn7SKtrbbtoAB6tfwT+upUxqwTpuZVitLTbuUSafeKUSt09p/H0kvutwpenypBHunFpa1i+Z/pd/MJ+FIedJqpojFfFmYIyHktwO3rIigJnzdmuQF+oo3c/9Xuz8+vazfFVCTLEAzIkokIqJop04o4GCiZzFHZTj5p85vxnfZMgBiHnZ5ox6h6mpzwomJPJWf4cSokh3bLuB7lUVWbLlv7/HklEKSZpBAKN0v7qogEshCCLGH9UX8HkpWJcM81ikXri2dUCsxz3dcXJ54q1glfw== [email protected]
- hosts: registry
sudo: yes
vars:
conjur_login: "{{ lookup('env', 'CONJUR_AUTHN_LOGIN') }}"
conjur_api_key: "{{ lookup('env', 'CONJUR_AUTHN_API_KEY') }}"
conjur_policy_id: "{{ lookup('env', 'CONJUR_POLICY_ID') }}"
tasks:
- name: add docker repository Key
apt_key: keyserver=keyserver.ubuntu.com id=36A1D7869245C8950F966E92D8576A8BA88D21E9
tags: prepare