Skip to content

Instantly share code, notes, and snippets.

View funnylookinhat's full-sized avatar

David Overcash funnylookinhat

View GitHub Profile
@jbroadway
jbroadway / Slimdown.md
Last active February 20, 2025 13:00
Slimdown - A simple regex-based Markdown parser.
@adrianwebb
adrianwebb / ssl_cert_generation_template
Last active November 8, 2024 07:35
Bash script to generate SSL key, passwordless pem, csr, and crt files
#!/bin/bash
function generate_ssl_cert {
cert_name=$1
(
openssl genrsa -des3 -out ${cert_name}.key 1024
openssl rsa -in ${cert_name}.key -out ${cert_name}.pem
openssl req -new -key ${cert_name}.pem -out ${cert_name}.csr
openssl x509 -req -days 365 -in ${cert_name}.csr -signkey ${cert_name}.pem -out ${cert_name}.crt
@kishalmi
kishalmi / gist:5638574
Last active December 17, 2015 16:28
three.js util - load shaders from files requires jquery for $.ajax
// object with shader paths (optinally nested, for better structure)
// the paths get replaced with the actual file content.
var shaders = {
atmoVert: 'glsl/atmo.vert.c',
car: {
vert: 'glsl/car.vert.c',
frag: 'glsl/car.frag.c'
}
};
@ijy
ijy / sublime-text-3-setup.md
Last active March 7, 2025 20:44
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@branneman
branneman / better-nodejs-require-paths.md
Last active April 11, 2025 10:39
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@padraic
padraic / checkciphers.php
Last active November 21, 2016 06:06
Comparing SSL/TLS ciphersuites for PHP 5.5, cURL and Mozilla
<?php
/**
* This script is designed as a simple tool to run comparisons between varying
* cipher suite lists used by PHP 5.5, cURL and Mozilla. The ciphersuites are
* are hardcoded and date to 01 February 2014
*
* The differences are restrictions, e.g. Mozilla diff from DEFAULT shows ciphers
* Mozilla has removed, etc. The differences should all be SSLv3 related.
*/
@rgarcia
rgarcia / db_stats.go
Last active August 30, 2016 09:42
mongo db stats
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"log"
"os"
"strings"
"text/tabwriter"
@soarez
soarez / ca.md
Last active April 24, 2025 12:51
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@ridgehkr
ridgehkr / .bowerrc
Last active August 29, 2015 14:04
Starter Gulp Project (compiles Sass, CoffeeScript and JavaScript, Jade)
{
"directory": "bower_components"
}

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea