Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
# Use these aliases in your gitconfig for awesomeness | |
# You can use them like so: | |
# git lg -> prettier logs | |
# git s -> "git status" | |
[alias] | |
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
s = status -s |
defmodule MyApp.Auth do | |
@moduledoc """ | |
Creates `Ueberauth.Auth` structs from OAuth responses. | |
This module is an ugly hack which is necessary because `Ueberauth` doesn't provide | |
the necessary hooks to get such a struct without giving it control of the whole | |
callback phase. We can't do this in the API because all the mobile app can give us | |
is the OAuth token. | |
Most of the code was lifted from Ueberauth, with minor changes as needed. |
defmodule MyApp.Scheduler do | |
@moduledoc """ | |
Schedules a Mix task to be run at a given interval in milliseconds. | |
## Options | |
- `:task`: The name of the Mix task to run. | |
- `:args`: A list of arguments to pass to the Mix task's `run/1` function. | |
- `:interval`: The time interval in millisconds to rerun the task. |
# ----------------------------------------------------- | |
# Ruby/Rails Heroku Deployment Script | |
# @author Daniel Berkompas | |
# | |
# After downloading, run `ruby deploy.rb --help` to | |
# get usage instructions. | |
# | |
# MIT License | |
# ----------------------------------------------------- | |
require 'optparse' |
defmodule Destructure do | |
@moduledoc """ | |
Provides helpers for destructuring Elixir data structures. See the `d/1` macro | |
for more information. | |
""" | |
@doc """ | |
Easy destructuring of maps and keyword lists, with atom keys only. | |
## Examples |
<html data-ember-extension="1"><head><script type="text/javascript" async="" src="https://d2rcp9ak152ke1.cloudfront.net/assets/javascripts/squatch.min.js"></script><script type="text/javascript" async="" src="https://cdn.heapanalytics.com/js/heap.js"></script><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<!-- iOS Home Screen Icons --> | |
<link rel="apple-touch-icon" sizes="57x57" href="/assets/mentor/lead_simple_mark_ios_57.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/assets/mentor/lead_simple_mark_ios_72.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="/assets/mentor/lead_simple_mark_ios_114.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="/assets/mentor/lead_simple_mark_ios_144.png"> | |
<!-- jQuery --> | |
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script> |
var pubsub = {}; | |
(function(q) { | |
var topics = {}, subUid = -1; | |
q.subscribe = function(topic, func) { | |
if (!topics[topic]) { | |
topics[topic] = []; | |
} | |
var token = (++subUid).toString(); | |
topics[topic].push({ | |
token: token, |
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
def pbcopy(str) | |
IO.popen('pbcopy', 'r+') {|io| io.puts str } | |
output.puts "-- Copy to clipboard --\n#{str}" | |
end | |
Pry.config.commands.command "hiscopy", "History copy to clipboard" do |n| | |
pbcopy _pry_.input_array[n ? n.to_i : -1] | |
end | |
Pry.config.commands.command "copy", "Copy to clipboard" do |str| |