Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
mkdir certs my-safe-directory
cat > ca.cnf <<EOF
# OpenSSL CA configuration file
[ ca ]
default_ca = CA_default
[ CA_default ]
default_days = 365

Keybase proof

I hereby claim:

  • I am 0x5d on github.
  • I am 0x5d (https://keybase.io/0x5d) on keybase.
  • I have a public key ASDxHkjFzPb2VRfBO9gdfpNP_Hf3xjTcOOIOkTkjdItcDAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am castillobgr on github.
  • I am castillobgr (https://keybase.io/castillobgr) on keybase.
  • I have a public key ASBoQmXKLcVjoddmMCQ1yd23-9tpyWlAJ9IvsysgLrpHRwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am castillobgr on github.
  • I am castillobgt (https://keybase.io/castillobgt) on keybase.
  • I have a public key ASAPSfwpRZ5Em4Iw9dSi42iWQEtJ4L8RQwlRal5o0o361Ao

To claim this, I am signing this object:

final float brightness = 200;
void setup() {
noLoop();
PImage img, mask;
img = loadImage("img.jpg");
mask = loadImage("mask.jpg");
img.loadPixels();
mask.loadPixels();
final int threshold = 38;
final color black = color(0);
final color white = color(255);
PImage img;
boolean isSorted = false;
void setup() {
img = loadImage("IMG_0010.jpg");
size(1, 1);
use std::io;
use std::sync::{Arc, LockResult, RwLock, RwLockReadGuard};
use std::thread::{Builder, JoinHandle};
struct Thing {
xs: RwLock<Vec<String>>
}
impl Thing {
use std::env;
struct Config { mode: String, port: String }
fn main() {
let args: Vec<_> = env::args().collect();
let config = parse_config(&args);
}
fn parse_config(args: &Vec<String>) -> Config {

Instala las herramientas

Asegúrate de que Node y Git queden en tu PATH, es decir, que al abrir una ventana de la terminal, puedas ejecutarlos así:

node --version
v4.5.0
@0x5d
0x5d / capturedVarsFix.go
Created March 30, 2016 21:00
A small piece of code to illustrate vars captured by range expressions in Golang.
package main
import (
"fmt"
"sync"
)
func main() {
// My opinions on people.
peopleOpinions := map[string]string{