Skip to content

Instantly share code, notes, and snippets.

View stringsn88keys's full-sized avatar

Thomas Powell stringsn88keys

View GitHub Profile
@stringsn88keys
stringsn88keys / .vimrc
Last active February 22, 2024 02:18
My current .vimrc file
"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'
@stringsn88keys
stringsn88keys / update_bundles.rb
Last active May 6, 2019 20:48
My current ruby script to update vim bundles... can't remember whose blog I got the starter from at this point.
#!/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",
@stringsn88keys
stringsn88keys / invert_as_arrays.rb
Created September 12, 2013 16:30
Patch to invert mappings of [key, value] in Hash to mappings of [value, [key1, key2, key3]]
class Hash
def invert_as_arrays
self.inject({}) { |r,x| r[x[1]] ||= []; r[x[1]] << x[0]; r }
end
end
/*
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;
@stringsn88keys
stringsn88keys / mapping.rb
Last active December 15, 2015 08:49
Translation of Betterment format to Drake software format (as documented, then as discovered.)
# 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]
@stringsn88keys
stringsn88keys / hacking "no return"
Created January 21, 2013 20:15
The mission: remove "return" from the following function. def multiple_of_three(n) return n % 3 == 0 ? "True" : "False" end
# 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