Skip to content

Instantly share code, notes, and snippets.

View christian-blades-cb's full-sized avatar

Christian Blades christian-blades-cb

View GitHub Profile
@christian-blades-cb
christian-blades-cb / rust_demo.rs
Created February 14, 2018 01:07
shapr's bookwords demo in rust
#[allow(unused_variables, dead_code)]
fn demo() {
let somenumber = 1; // immutable variable
let somestring = "somestring"; // also ummutable
// with type signature
let some_other_string: &str = "some other string";
}
#[allow(dead_code)]

Self-Hosted VPN

Pricing

providercheapest tier $/moegress $/GBfree egress GBingress $/GBfree ingress GB$/TB/mo
GCE00.12100122.76
AWS00.0910092.07
Azure00.08750088.653
➜ src git:(master) ✗ cargo bench -j 2
Finished release [optimized] target(s) in 0.0 secs
Running /home/cblades/dev/rust/prime_sieve/target/release/deps/prime_sieve-6cf5846238c99524
running 3 tests
test tests::bench_sundaram_hashset_1000 ... bench: 1,641,005 ns/iter (+/- 87,741)
test tests::bench_sundaram_vec_1000 ... bench: 81,529 ns/iter (+/- 3,800)
test tests::bench_sundaram_vec_10000 ... bench: 7,592,283 ns/iter (+/- 426,879)
test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured
FROM python:2.7-alpine
RUN pip install tox
ADD . /src
WORKDIR /src
CMD tox

Keybase proof

I hereby claim:

  • I am christian-blades-cb on github.
  • I am cblades (https://keybase.io/cblades) on keybase.
  • I have a public key ASCnnfuBpu8Fz3IRjGtmjBFHJT1lPzzw6VVjVeTbisBbhQo

To claim this, I am signing this object:

@christian-blades-cb
christian-blades-cb / celery.five.py
Created April 26, 2016 20:01
my own personal hell
# celery/five.py
__all__ = ['Counter', 'reload', 'UserList', 'UserDict', 'Queue', 'Empty',
'zip_longest', 'map', 'string', 'string_t',
'long_t', 'text_t', 'range', 'int_types', 'items', 'keys', 'values',
'nextfun', 'reraise', 'WhateverIO', 'with_metaclass',
'OrderedDict', 'THREAD_TIMEOUT_MAX', 'format_d',
'class_property', 'reclassmethod', 'create_module',
'recreate_module', 'monotonic']
# ...
from kombu.five import monotonic
@christian-blades-cb
christian-blades-cb / coreos-kubernetes-hvm.json
Created January 18, 2016 20:14
cloudformation-coreos-kubernetes-hvm
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Kubernetes on CoreOS",
"Mappings" : {
"RegionMap" : {
"ap-northeast-1": {
"AMI": "ami-dae8c1b4"
},
"ap-southeast-1": {
"AMI": "ami-085a9a6b"
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-bececaa3"
},
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-448dbd59"
},
@christian-blades-cb
christian-blades-cb / cloudformation-coreos-stable-vpc.json
Created January 28, 2015 02:56
Cloudformation for launching CoreOS inside a VPC
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-448dbd59"
},