Skip to content

Instantly share code, notes, and snippets.

View jcockhren's full-sized avatar
👨‍🍳
Cooking up something 🔥

Jurnell Cockhren jcockhren

👨‍🍳
Cooking up something 🔥
View GitHub Profile
@rinx
rinx / predef.scss
Created February 18, 2014 14:50
reveal.js theme 'tricol'
/*
* predefined classes
*
* Copyright (C) 2013 Rintaro Okamura
*/
//mixin
$vendpf: -webkit-, -moz-, -ms-, -o-, '';
from salt.client import LocalClient
client = LocalClient()
o = client.cmd(t, 'cmd.run_all', kwarg={
'cmd': 'curl *options and url redacted*',
'cwd': dirname
})
print "Ret: %(retcode)d\n\nstdout:\n%(stdout)s\n\nstderr:\n%(stderr)s\n" % o[t]
print o[t], "\n"
if o[t]['retcode'] != 0:
client.cmd(t, 'file.remove', arg=(dirname,), timeout=5)
@jorendorff
jorendorff / rawcode.c
Last active December 30, 2015 12:19
A first experiment in creating and running x86 machine code on the fly. By Nick Desaulniers: http://nickdesaulniers.github.io/blog/2013/04/03/basic-jit/
// To compile this on mac: gcc -m32 -o rawcode rawcode.c
// Probably the same on linux, or drop the -m32.
// Then: ./rawcode
#include <stdio.h> // printf
#include <string.h> // memcpy
#include <sys/mman.h> // mmap, munmap
int main () {
// x86 machine code for: int mul (int a, int b) { return a * b; }
@rgbkrk
rgbkrk / fabfile.py
Last active December 25, 2015 16:49
Fabric file for creating named servers on Rackspace and bootstrapping them as salt minions.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Bootstrapping the salt minions on Rackspace (using fabric rather than
salt-cloud).
This is not the most effective way to do this, but it gets it done.
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active March 13, 2025 08:47
How to use Pelican on GitHub Pages
@mtigas
mtigas / gist:952344
Last active March 20, 2025 09:03
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: