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 uses the Adafruit ST7735 tft display and teensy 4.0 | |
// audio out -> teensy pin mappings | |
/* | |
+ -> 12 | |
- -> GND | |
*/ | |
// tft -> teensy pin mappings: | |
/* |
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
//PGraphics pg; | |
class Triangle { | |
private float angle = 0; | |
Triangle() { | |
} | |
void rotate() { | |
this.angle += 1; |
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
require 'sinatra' | |
require 'base64' | |
set :environment, :production | |
get '/' do | |
html = ' | |
<form action="run" method="POST" enctype="multipart/form-data"> | |
<input type="file" name="file" accept="image/*" capture="camera"> | |
<input type="submit" value="Upload image"> |
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
"vim tab mapping for default autocomplete | |
:function AutoComplete() | |
: if len(matchstr(getline('.')[col('.')-2], "[^ \t\n]*$")) > 0 | |
: return "\<C-N>" | |
: else | |
: return "\<TAB>" | |
: endif | |
:endfunction | |
inoremap <silent> <TAB> <C-R>=AutoComplete()<CR> |
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
1.upto(100){|n|print ((n%3==0&&'FIZZ'||'')+(n%5==0&&'BUZZ'||'')).downcase!||n} |
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
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
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() | |
syntax on | |
filetype plugin indent on | |
let g:solarized_termcolors = 256 | |
let g:solarized_termtrans = 1 | |
syntax enable | |
set background=dark | |
colorscheme solarized |
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
# bash | |
PS1="\w: " | |
alias sadface='echo -e " /^^^^^^^\\ \n/ /. .\\ \\ \n| , |\n| D |\n| ___ |\n \\ / \\ / \n \\_____/ "' | |
alias reload="source ~/.bashrc && echo reloaded bash" | |
alias sp="reload" | |
alias dtree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" | |
export HISTFILESIZE=3000 | |
alias now="date +'%Y%m%d%H%M%S'" | |
alias ts="now | tr '\n' '\000' | pbcopy" |
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
require 'sinatra' | |
use Rack::CommonLogger | |
use Rack::Logger | |
require 'json' | |
post '/hi/there' do | |
request.logger.info JSON.pretty_generate(request.env) | |
"success\n" | |
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
require 'rack-proxy' | |
require 'rack' | |
RemoteHostForName = { | |
'simple' => "localhost:4567" | |
} | |
class ExternalProxy < Rack::Proxy | |
def rewrite_env(env) | |
#request = Rack::Request.new(env) |
NewerOlder