Skip to content

Instantly share code, notes, and snippets.

View leoallen85's full-sized avatar

Leo Allen leoallen85

  • Makers Academy
  • London, UK
View GitHub Profile
require './lib/query'
require 'delegate'
module Mappable
extend Forwardable
attr_reader :attributes
delegate find: 'self.class'
nav:
call_to_action:
text: Apply now
link: apply/now
links:
- text: Link 1
link: atoms
- text: Link 2
link: atoms
nav:
class Base
def call
p "Base"
end
end
module Mixin
def call
p "Mixin"
super
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set-option -g default-command 'exec reattach-to-user-namespace -l zsh'
bind-key C-c run-shell 'tmux save-buffer - | reattach-to-user-namespace pbcopy'
bind-key C-v run-shell 'reattach-to-user-namespace pbpaste | tmux load-buffer - \; paste-buffer -d'
bind-key -t vi-copy y 'reattach-to-user-namespace pbcopy'
bind-key -t emacs-copy M-w 'reattach-to-user-namespace pbcopy'
# improve colors
set -g default-terminal 'xterm-256color'
unbind r
bind r source-file ~/.tmux.conf
# act like vim
setw -g mode-keys vi
bind h select-pane -L
# improve colors
set -g default-terminal 'screen-256color'
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
@leoallen85
leoallen85 / callbacks.rb
Created March 12, 2015 15:05
Passing methods as arguments with Ruby
def square(integer)
integer * integer
end
[1,2,3].map(&method(:square)) # => [1,4,9]
@leoallen85
leoallen85 / Interview Questions.md
Created March 10, 2015 14:49
A list of potential interview questions

The broader themes of interview questions are explained in this slidedeck

Questions

  • Name a design pattern
  • What do you like about JavaScript, what do you hate about it?
  • What languages in the future are you most excited about?
  • What are the drawbacks of TDD? When would you not do it?
  • Why are cache invalidation and naming things considered the hardest things in programming?
  • How would you deploy code to production?
Monopoly Game
______________
As a
I want to
So I can
MVP
Feature:
@leoallen85
leoallen85 / reading.md
Last active August 29, 2015 14:16
Reading for Taking Your Coding Further