This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ElxWebserver do | |
use Foo | |
use Foo.Bar | |
def indentation_screwed() | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facter.add("is_vagrant") do | |
setcode do | |
vagrant = false | |
if File.exist? "/home/vagrant" | |
vagrant = true | |
end | |
vagrant | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node 'render.local' { | |
require core | |
include pdftoolbox | |
include tet | |
include nginx | |
include uwsgi | |
include sensu | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from flask import Flask, make_response, request | |
from sqlalchemy import create_engine | |
app = Flask(__name__) | |
engine = create_engine('postgresql://eventcaptureuser:postgres@localhost/event', | |
pool_size=100, max_overflow=0) | |
@app.route("/capture", methods=['POST']) | |
def capture(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Banana do | |
def banana do | |
receive do | |
:banana -> :io.format "I fucking love bananas." | |
_ -> :io.format "Nada" | |
after | |
1000 -> IO.puts "Nope" | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Banana do | |
def banana do | |
receive do | |
:banana -> :io.format "I fucking love bananas." | |
_ -> :io.format "Nada" | |
after | |
1000 -> IO.puts "Nope" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this alias either by command line: | |
$ git config --global alias.lm 'log --pretty=format:\'%Cred%h%Creset %C(bold blue)<%an>%Creset -%C(yellow)%d%Creset %C(bold cyan)%s %Cgreen(%cr)%n%Creset%n - %b%n\' --abbrev-commit --date=relative --merges' | |
# or add this to the [alias] section of ~/.gitconfig | |
# lm = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset -%C(yellow)%d%Creset %C(bold cyan)%s %Cgreen(%cr)%n%Creset%n - %b%n' --abbrev-commit --date=relative --merges | |
# Then execute the command, optionally (but I can't imagine why you'd use it without them) adding a range of commits: | |
$ git lm 1.7..HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You can run this to make fetch automatically prune any time you pull or | |
# fetch. | |
# | |
# git config remote.origin.prune true | |
git fetch --prune | |
# Abort early if there are local changes | |
git checkout master || exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; With numeric ARG, display the tool bar if and only if ARG is | |
;; positive. Tool bar has icons document (read file), folder (read | |
;; directory), X (discard buffer), disk (save), disk+pen (save-as), | |
;; back arrow (undo), scissors (cut), etc. | |
(tool-bar-mode 0) | |
;; Get rid of the annoying splash and startup screens | |
(setq HOME (expand-file-name "~/")) | |
(setq PATH (getenv "PATH")) | |
(setenv "PATH" (concat PATH ":/opt/vagrant/bin:" (concat HOME "bin"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function brazzers (x, y) { | |
var dfd; | |
dfd = new $.Deferred; | |
if (x < y) { | |
dfd.reject("Fail"); | |
} else if (y < x) { | |
dfd.reject("Fail"); | |
} else { | |
dfd.resolve(x + y); |