Skip to content

Instantly share code, notes, and snippets.

View dynnamitt's full-sized avatar
:atom:
yolo

Kjetil Midtlie dynnamitt

:atom:
yolo
  • Norway
View GitHub Profile
@agarnaas
agarnaas / ggp-plural.bash
Created January 27, 2017 07:55
terminal git pull mange directories
for r in */.git; do (cd $r/..; ggl); done
@masatomo
masatomo / gist:983a84bad9671dc29213
Last active February 28, 2018 08:49
How to use MongoDB 2.6.x on CircleCI (circle.yml)
dependencies:
cache_directories:
- mongodb-linux-x86_64-2.6.4
pre:
- if [[ ! -d mongodb-linux-x86_64-2.6.4 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz && tar xvzf mongodb-linux-x86_64-2.6.4.tgz; fi
- sudo /etc/init.d/mongodb stop
- sudo cp mongodb-linux-x86_64-2.6.4/bin/* /usr/bin
- sudo /etc/init.d/mongodb start
@gmr
gmr / consul.lua
Created July 14, 2014 17:03
Dynamic Nginx upstream nodes using Consul
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
@jescalan
jescalan / stylus-plugins.md
Created January 5, 2014 01:20
Stylus Plugin Use

Stylus Plugin Use

This document will briefly review a few of the more common ways of using stylus plugins for those who are not familiar. Throughout these examples, we will be using a non-existant stylus plugin called example. Please change example out for whatever plugin you are actually trying to use!

Standalone/Node

First example is for if you are building your own stylus pipeline in node. This is a pretty standard way to do things.

@xuanlongma
xuanlongma / pandoc_multi_input.md
Last active May 1, 2024 19:18
Combine multiple input files when using Pandoc

If multiple input files are given, pandoc will concatenate them all (with blank lines between them) before parsing. -- from Pandoc website

Pandoc command: pandoc -s input1.md input2.md input3.md -o output.html

@jasonhwest
jasonhwest / gist:4195171
Created December 3, 2012 13:51
JavaScript: Recursive setTimeout
//original from http://www.erichynds.com/javascript/a-recursive-settimeout-pattern/
var poller = {
// number of failed requests
failed: 0,
// number of failed requests allowed
failedLimit: 10,
// starting interval - 5 seconds
@dynnamitt
dynnamitt / gui-mergetool
Created October 23, 2012 08:37
GUI mergetool setup
sudo aptitude install meld; git config --global merge.tool meld
@DamienCassou
DamienCassou / update-emacs-ppa.sh
Last active February 20, 2016 21:26
Emacs-snapshot and emacs24 build script for Ubuntu PPA
#! /usr/bin/env bash
# Author: Damien Cassou
#
# This is the script I use to build Emacs packages for Ubuntu. These
# packages are uploaded to
# https://launchpad.net/~cassou/+archive/emacs/. Each package is
# either build from a Debian package or from
# http://emacs.naquadah.org/.
@avernet
avernet / gist:2025806
Created March 13, 2012 00:49
Using the exception catcher processor in XPL, with Orbeon Forms
<?xml version="1.0" encoding="utf-8"?>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<p:param name="instance" type="input"/>
<p:param name="data" type="output"/>
<!-- Using the URL generator, which here will 404 -->
<p:processor name="oxf:url-generator">
@joshbirk
joshbirk / samplerest.js
Created February 3, 2012 19:57
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')