Skip to content

Instantly share code, notes, and snippets.

@gbirke
gbirke / ael.xml
Created August 18, 2010 11:43
jEdit edit mode for Asterisk AEL files
<?xml version="1.0"?>
<!DOCTYPE MODE SYSTEM "xmode.dtd">
<MODE>
<PROPS>
<PROPERTY NAME="lineComment" VALUE="//" />
</PROPS>
<RULES>
@gbirke
gbirke / .gitconfig
Last active September 26, 2015 10:27
My default .gitconfig
# You can copy this file to your computer with the following command:
# wget https://gist.github.com/raw/1082842/.gitconfig
[user]
name = Gabriel Birke
email = gb@birke-software.de
[core]
quotepath = false
[color]
ui = auto
[color "branch"]
@gbirke
gbirke / .alias
Last active September 27, 2015 12:08
My default .alias file
# You can copy this file to your computer with the following command:
# wget https://gist.github.com/raw/1267907/.alias
# include in your .bash_profile with "source .alias" or do the following:
# ln -s .alias .bash_aliases
alias ll="ls -al"
alias ..="cd .."
alias ...="cd ../.."
alias pu=pushd
@real34
real34 / HttpAuth-Recipe.rb
Created April 5, 2012 12:33
Capistrano : Http Authentification recipe - Generates htaccess/htpasswd Apache protection for your project
##
# HTTP Authentification deployment Recipe
# => Add htaccess password protection when deploying, with the correct htpassword file for the passed users
##
_cset (:http_auth_users) {[
["admin", "password"]
]}
_cset (:http_auth_path) { "" } # Path of the directory to add http auth, from the release root
namespace :httpAuth do
@uppfinnarjohnny
uppfinnarjohnny / container.py
Created April 14, 2012 16:59
Simple DI Container for Python, inspired by Pimple (http://pimple.sensiolabs.org/)
class Container(dict):
def __init__(self, *args, **kwargs):
super(Container, self).__init__(*args, **kwargs)
self._shared = set()
self._instances = {}
def __getitem__(self, key):
if key in self._instances:
return self._instances[key]
@harlantwood
harlantwood / push_to_github.rb
Created June 15, 2012 07:27
Commit and push via Github REST API, from ruby RestClient
# Committing changes to a repo via the Github API is not entirely trivial.
# The five-step process is outlined here:
# http://developer.github.com/v3/git/
#
# Matt Swanson wrote a blog post translating the above steps into actual API calls:
# http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html
#
# I was not able to find sample code for actually doing this in Ruby,
# either via the HTTP API or any of the gems that wrap the API.
# So in the hopes it will help others, here is a simple function to
@afair
afair / tmux.cheat
Last active October 11, 2023 13:48
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@jcf
jcf / custom_inputs.js.coffee
Created September 2, 2012 20:10
Ember.js inputs with labels via a custom ContainerView instance
App.FieldView = Em.ContainerView.extend
tagName: ''
type: 'text'
label: null
value: null
size: '30'
required: null
requiredAttribute: (->
if @get('required') == 'true' then '' else null
).property('required')
@kevinold
kevinold / .ackrc
Created February 10, 2013 13:54 — forked from hernamesbarbara/.ackrc
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code
#to install ack, see http://betterthangrep.com/
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>'
#ack will search all files in the current directory & sub-directories
#here's how I have my config file setup. this file is located on mac osx here
# ~/.ackrc
# Always sort the files
@bMinaise
bMinaise / bs3-login-form.html
Created November 6, 2013 02:20
Bootstrap 3 - Login Form Example From: http://bootsnipp.com
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1>
<div class="account-wall">
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
alt="">
<form class="form-signin">
<input type="text" class="form-control" placeholder="Email" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>