This file contains 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
IFS=$'\n' ; for x in $(git shortlog -sne | cut -f2 -d$'\t' | sed -e 's/ <.*//' | sort | uniq); do echo $x; git log --since '2 weeks ago' --author="$x" -p | grep '^[+-][^+-]' | wc | cut -c1-8 ; done |
This file contains 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
# Prefix | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Mouse scrolling | |
set-option -g mouse on | |
# make scrolling with wheels work | |
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" |
This file contains 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
execute pathogen#infect() | |
call pathogen#helptags() | |
syntax enable | |
set background=light | |
colorscheme solarized | |
set guifont="Inconsolata" | |
set smartindent |
This file contains 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
ENV["SINATRA_ENV"] ||= "development" | |
require_relative './config/environment' | |
require 'sinatra/activerecord/rake' | |
require 'active_support/duration' | |
namespace :medicine do | |
task :send_reminders do | |
twilio_account_sid = "AC4bf52c17125e47be385b764e50474a64" | |
twilio_auth_token = "0231a729464dedc96dd783b0a39c9ba8" |
This file contains 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
var header = document.getElementById("header") | |
var button = document.getElementById("login-button") | |
button.addEventListener("click", function() { | |
validateForm() | |
}) | |
function validateForm() { | |
if(checkPassword() == true && checkUsername() == true) { |
This file contains 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
def find(id) | |
cmd = `sqlite3 test "select * from things where id = #{id}"` | |
end | |
def all | |
users_array = [] | |
users = `sqlite3 test "select * from things;"`.split("\n") | |
users.each { |user| users_array << user } |
This file contains 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 stringy(num) { | |
var result = [1]; | |
if (num == 1) { return result; }; | |
for(i = 0; i < num; i++) { | |
var lastElement = result[result.length - 1]; | |
lastElement == 0 ? result.push(1) : result.push(0); | |
} |
This file contains 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
➜ new-repository git init | |
Initialized empty Git repository in /Users/dylanrichards/code/new-repository/.git/ | |
➜ new-repository git:(master) touch index.html | |
➜ new-repository git:(master) ✗ gd | |
➜ new-repository git:(master) ✗ gaa | |
On branch master | |
Initial commit | |
Changes to be committed: |
This file contains 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
class WakaWaka | |
attr_reader :code | |
def initialize(code) | |
@code = code | |
end | |
MAPPINGS = { | |
'<' => 'Waka', | |
'>' => 'waka', |
This file contains 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
class NumberGuessingGame | |
def initialize | |
p @number = rand(0..9).to_s | |
end | |
def guess | |
puts "I'm thinking of a random number from 0 to 9" | |
puts "Can you guess it?" | |
input = gets.chomp |
NewerOlder