Skip to content

Instantly share code, notes, and snippets.

View ChristianBagley's full-sized avatar

Christian Bagley ChristianBagley

View GitHub Profile
@ChristianBagley
ChristianBagley / .vimrc
Created August 22, 2016 23:59 — forked from joegoggins/.vimrc
Mac Vim .vimrc file
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" ================ General Config ====================
set number "Line numbers are good
set backspace=indent,eol,start "Allow backspace in insert mode
set history=1000 "Store lots of :cmdline history
set showcmd "Show incomplete cmds down the bottom
@ChristianBagley
ChristianBagley / niftydrive-sd-card-symlinks.md
Created July 9, 2016 19:53 — forked from onnimonni/niftydrive-sd-card-symlinks.md
This is small description about a few folders which can be moved to sd card in order to have more space inside the ssd of OSX. This is focused for web developer who uses node,php,vagrant etc...

Information Workflow

Hi I'm Matthew McCullough. I'm at @matthewmccull on Twitter. I work at GitHub as a trainer and need to organize lots of information in order to write books like Presentation Patterns, the O'Reilly Git book, Gradle book, and over a thousand presentations.

Today's big ideas are:

  • Discover
  • Capture
  • Create
  • Process
# Used to find a unique pattern of repeating characters found in a given word
def find_pattern(word)
pattern = Array.new(word.length, nil)
for i in (0...word.length)
next if pattern[i] != nil
for j in ((i + 1)...word.length)
pattern[j] = i if word[i] == word[j]
end
end
pattern.slice(1,9999)
#!/usr/bin/env python
'''
Basic Cryptanalysis
url: https://www.hackerrank.com/challenges/basic-cryptanalysis
input: space separated input cipher
output: space separated decoded message
@ChristianBagley
ChristianBagley / file
Created February 1, 2016 11:56
freedom_public
{"0.012032995977183658":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMENlm0aP3XYwddhOyIlosMzKg0ZkTcDmSM\r\nHZsAIjJ+NTjWMDo02Lh3AzpgPruquLwbqhMsDLjGZrlGGof9n6DA9c3/AAAACDxn\r\naXRodWI+wv8AAACNBBATCAA//wAAAAWCVq9H2/8AAAACiwn/AAAACZDjHBlcM1jr\r\nVP8AAAAFlQgJCgv/AAAAA5YBAv8AAAACmwP/AAAAAp4BAAAvhAEA8Wr3qEdw80b0\r\nvt9k8G87Kr709BPiulNlq1mQgEJMsJIA/RVAi8BPOB11l0Na26E2uaRcRcz9G2Gi\r\nBMTxphe0KtwWzv8AAABWBAAAAAASCCqGSM49AwEHAgMEyJadQLZXcZpjEvZQaRMD\r\nXdau9b0RdOrnzj51yKufirH6wBtN8Wph0EaRAK0DURD3r8YmHpzBrsdymZ2Qu9po\r\nJAMBCAfC/wAAAG0EGBMIAB//AAAABYJWr0fb/wAAAAmQ4xwZXDNY61T/AAAAApsM\r\nAACgVwD5AXgjfnuh+SHPWfM3fAx5tyOBxAJNyiukwLazOErb/iIA/iCT/WsSEE45\r\nmxjvwJIU4x6KnP/b/cB5TNFvpg3PFzJZ\r\n=bAeI\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
@ChristianBagley
ChristianBagley / init.lua
Created January 30, 2016 05:44 — forked from brianchung808/init.lua
My config file for Hammerspoon
local mash = {"shift", "alt"}
-- disable window animation
hs.window.animationDuration = 0
function fullscreen()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
@ChristianBagley
ChristianBagley / init.lua
Created January 30, 2016 05:44 — forked from eltercero/init.lua
Config file for hammerspoon
local hotkey = require "hs.hotkey"
local application = require "hs.application"
-- HOTKEYS
local mash = {"cmd", "alt", "ctrl"}
local app_opener = {"cmd", "ctrl"}
-- Helpers
function resize_and_move(direction)
return function()
@ChristianBagley
ChristianBagley / app.rb
Created January 27, 2016 20:03 — forked from troelskn/app.rb
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do
@ChristianBagley
ChristianBagley / # macvim - 2016-01-07_22-22-19.txt
Created January 8, 2016 03:23
macvim on OS X 10.11.2 - Homebrew build logs
Homebrew build logs for macvim on OS X 10.11.2
Build date: 2016-01-07 22:22:19