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
# I figured that the "correctness" test is the existence of "return" as a word within the function, so... | |
def multiple_of_three(n) | |
eval "#{'r e tu rn'.split.join} n % 3 == 0 ? \"True\" : \"False\"" | |
end |
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
# This is the layout that Drake had documented (coming from Betterment format) | |
oldLayoutJustForReference = <<-LAYOUT | |
0,TSJ,"T" | |
1,F,"" | |
2,State,"" | |
3,City,"" | |
4,Date Sold (MMDDYYYY),column[:f] | |
5,Date Acquired (MMDDYYYY),column[:e] | |
6,Proceeds,column[:g] | |
7,Cost,column[:h] |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: | |
int led = 13; |
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 Hash | |
def invert_as_arrays | |
self.inject({}) { |r,x| r[x[1]] ||= []; r[x[1]] << x[0]; r } | |
end | |
end |
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
#!/usr/bin/env ruby | |
git_bundles = [ | |
"https://github.com/kien/ctrlp.vim", | |
"git://github.com/tpope/vim-fugitive.git", | |
# "git://github.com/tpope/vim-rails.git", | |
# "git://github.com/tpope/vim-abolish.git", | |
# "https://github.com/rizzatti/dash.vim.git", | |
"https://github.com/wavded/vim-stylus.git", | |
"git://github.com/slim-template/vim-slim.git", |
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
"let g:powerline_config_overrides={"common":{"log_file":"/tmp/powerline.log"}} | |
" | |
" :h feature-list for a list of features that are testable | |
if !has("win32") | |
set shell=/bin/zsh | |
endif | |
call plug#begin('~/vimfiles/plugged') | |
Plug 'https://github.com/bhrown/brown.vim.git' | |
"Plug 'https://github.com/github/copilot.vim.git' |
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
export PMPSVN='http://cvs.appriss.com/svn/softeng/projects/pmp' | |
export PATH=~/bin:$PATH | |
export DYLD_LIBRARY_PATH=~/instantclient_11_2 | |
#alias gvim='mvim' | |
export EDITOR=/usr/local/bin/mvim | |
export NARWHAL_ENGINE=jsc | |
export RSENSE_HOME=~/.vim/bundle/rsense | |
export PATH="/Library/PostgreSQL/9.2/bin:/usr/local/narwhal/bin:$PATH" |
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 move_to_third(r,c) | |
local win = hs.window.focusedWindow() | |
local f = win:frame() | |
local screen = win:screen() | |
local extents = screen:frame() | |
f.x = extents.x + (extents.w / 3) * c | |
f.y = extents.y + (extents.h / 3) * r | |
f.w = extents.w / 3 | |
f.h = extents.h / 3 |
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
-- https://en.wikipedia.org/wiki/Web_colors#X11_color_names | |
-- hs.streamdeck.init(function(connected, sd) | |
-- device = hs.streamdeck.getDevice(1) | |
-- device.setButtonColor("1", hs.drawing.color.x11.teal) | |
-- end) | |
applications = { "Messages", "iTunes", "Skype for Business", "iTerm2", "Microsoft Outlook", "HipChat", "Microsoft OneNote", "MacVim", "RubyMine", "Firefox" } | |
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "pageup", function() |
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
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'wp_example_com'); | |
/** MySQL database username */ | |
define('DB_USER', 'examplecom'); | |
/** MySQL database password */ | |
define('DB_PASSWORD', 'ASD9@!h12'); |
OlderNewer