Skip to content

Instantly share code, notes, and snippets.

View rbk's full-sized avatar

Richard Keller rbk

View GitHub Profile
@jamesdlacroix
jamesdlacroix / proposal-example.md
Last active October 15, 2023 19:46
Example markdown proposal to be used with Marked. For more information, check out the blog post on how we are using this to streamline our proposal writing. http://www.lacroixdesign.net/blog/streamlining-our-proposal-writing-process/

Title: Project Title Author: First Last Email: Email@Example.com Address: 1234 Street, City, State 12345 Phone: (XXX)XXX-XXXX Affiliation: www.LaCroixDesign.net Copyright: 2015 Company Name Keywords: Proposal, Web Design Date: March 13, 2015

@JonCatmull
JonCatmull / curly_swap.php
Last active August 29, 2015 14:10
Function to Swap words inside double curly braces for entries in an array
<?php
function curlySwap($shortcodes,$string) {
return preg_replace_callback(
'/\{\{(\w+)\}\}/',
function ($match) {
global $shortcodes;
return $shortcodes[substr($match[0], 2, -2)];
},
$string
);
@rbk
rbk / gist:9878aaeaab45e7f29a99
Created October 7, 2014 07:24
Awesome git logging! Paste this in terminal and check logs with: git lg
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@e1024kb
e1024kb / gist:41bf38fdb1a2cb19a781
Created September 27, 2014 13:29
Country - state list in JSON
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
anonymous
anonymous / Default.sublime-theme
Created September 5, 2014 22:13
Sublime Text 2 Default theme file
[
{
"class": "label_control",
"color": [255, 255, 255],
"shadow_color": [24, 24, 24],
"shadow_offset": [0, -1]
},
{
"class": "button_control",
"content_margin": [6, 5, 6, 6],
@chrisjhoughton
chrisjhoughton / proxy.apache.conf
Last active April 26, 2024 06:26
Sample Nginx reverse proxy to Apache set up for Wordpress.
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
@jshawl
jshawl / Gruntfile.js
Last active January 18, 2023 13:52
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@philfreo
philfreo / simple_allow_all.xml
Last active October 23, 2019 02:39
AWS S3 CORS policy examples
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
<AllowedHeader>Content-*</AllowedHeader>
<AllowedHeader>Host</AllowedHeader>
</CORSRule>
@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|