Skip to content

Instantly share code, notes, and snippets.

View MicahElliott's full-sized avatar

Micah Elliott MicahElliott

View GitHub Profile
@srpouyet
srpouyet / nginx.conf
Last active August 5, 2018 22:37
Nginx Upstart script (Ubuntu 12.04)
### Nginx upstart script
### source: http://serverfault.com/a/391737/70451
### /etc/init/nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/sbin/nginx
@MicahElliott
MicahElliott / arch-augment-vim-for-python.md
Created July 4, 2012 18:01
Configure vim in arch linux for python runtime support

Steps to upgrade vim in arch linux for python runtime support

Python support is needed by vim in order to run things like Conque and Slimv. Arch keeps vim slim by only providing Python support in gvim. But you may prefer vim to gvim, so here's what's needed.

More ABS info.

# Install and run abs (sync)

sudo pacman -S abs

@jrmoran
jrmoran / controllers.coffee
Created November 28, 2012 18:43
AngularJS Testing Controllers with Testacular & Testem
# = require '../components/jquery/jquery'
# = require '../components/angular-complete/angular'
Controllers = angular.module 'controllers', []
Controllers.controller 'PhoneListCtrl', ['$scope', ($scope)->
$scope.phones = [
{name: "Nexus S", snippet: "Fast just got faster with Nexus S."},
@jkresner
jkresner / Procfile
Created April 13, 2013 09:05
Deploy brunch to heroku
web: ./node_modules/.bin/coffee app.coffee
@MicahElliott
MicahElliott / dict-search-arch.md
Created July 10, 2013 00:42
Set up local dictionary search on ArchLinux

Install the dictionary.

% pacman -S words

Make it convenient.

% alias g='grep --color=always --perl-regexp'
% export dict=/usr/share/dict/american-english

Use it.

@parmentf
parmentf / GitCommitEmoji.md
Last active May 18, 2024 12:54
Git Commit message Emoji
@subfuzion
subfuzion / curl.md
Last active May 16, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@muammar
muammar / getFirafonts.sh
Created May 23, 2016 08:41
Download and install Fira fonts in Linux or Mac OS X
#!/bin/bash
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html
cd /tmp
# install unzip just in case the user doesn't already have it.
if [[ `uname` = Linux ]]; then
sudo apt-get install unzip -y
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
@joelittlejohn
joelittlejohn / test.clj
Last active July 3, 2023 21:08
Dynamically generate clojure.test deftests (and other tricks)
(ns dynamic.test
(:require [clojure.test :refer :all]))
;; This example shows how tests can be generated dynamically, by
;; creating new vars with the correct metadata.
(defn add-test
"Add a test to the given namespace. The body of the test is given as
the thunk test-fn. Useful for adding dynamically generated deftests."
[name ns test-fn & [metadata]]
;; Rename clj/cljs/cljc buffers to their namespace name, so you see
;; `foo.bar.core' in the modeline, rather than `core.clj'
(advice-add 'rename-buffer :around #'plexus/clj-ns--rename-buffer-advice)
(defun plexus/clj-ns--rename-buffer-advice (rb-fun newname &optional unique &rest args)
(let ((filename (buffer-file-name (current-buffer)))
(buf-start (buffer-substring-no-properties (point-min) (point-min))))
(if (and (string-match "\\.clj[cxs]?$" filename)
(string-match "(ns \\([^\n )]+\\)" buf-start))
(match-string-no-properties 1 buf-start)