Skip to content

Instantly share code, notes, and snippets.

View johncadengo's full-sized avatar

John Cadengo johncadengo

View GitHub Profile
@johnhamelink
johnhamelink / git-pre-push-hook-install.sh
Last active January 29, 2021 08:13 — forked from ssaunier/git-pre-push-hook-install.sh
Made the echo command output colour on a Linux terminal, removed karma and added a crunchbang
cd /path/to/your/repo
curl https://gist.githubusercontent.com/johnhamelink/577b8613ae82d2b3037b/raw/ad71fb72a1b86ee9a90ac62eccc4a55367578625/pre-push.sh > .git/hooks/pre-push
chmod u+x .git/hooks/pre-push
@L422Y
L422Y / osx_automount_nfs.md
Last active March 31, 2025 20:26
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@ungoldman
ungoldman / dokku_setup.md
Last active November 28, 2023 12:35
Deploy your own PaaS: Setting up Dokku with DigitalOcean and Namecheap

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.


This write-up is several years out of date! You probably shouldn't use it.

@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 20, 2025 17:17
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dirn
dirn / andy.py
Last active December 21, 2015 22:59
String Concatenation
from itertools import chain, islice
s1 = '4K Media'
s2 = '53 W. 23rd St.'
s3 = ''.join(chain(islice(filter(str.isalnum, s1), 4),
islice(filter(str.isalnum, s2), 8)))
assert s3 == '4KMe53W23rdS'
@afeld
afeld / gist:5704079
Last active November 15, 2024 15:57
Using Rails+Bower on Heroku
@rjzak
rjzak / PyUtils.cpp
Last active May 15, 2024 21:06
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 1, 2025 01:48
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

require 'rspec'
describe "Behaviour" do
it "should pass" do
true.should eq true
end
it "should fail" do
true.should eq false
end
@ndarville
ndarville / business-models.md
Last active February 27, 2025 10:00
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google