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
Developing in containers (bad!!!) | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2 | |
tar -xjvf vim-8.1.tar.bz2 | |
cd vim81/ | |
make | |
export PATH=$PWD/src:$PATH | |
git clone https://github.com/joshp123/dotfiles.git /tmp/dotfiles | |
cp /tmp/dotfiles/.vimrc ~ | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim |
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
import threading | |
import time | |
import logging | |
logging.basicConfig() | |
log = logging.Logger(__name__) | |
class CrashyThread(threading.Thread): | |
def run(self): |
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
:%s/\(\zs\S\+\ze\s\{1}[=]\)/config["\1"]/g | |
(then do this because it's buggy) | |
%s/ ="/"/g | |
given a file like so: | |
foo = {SomeObject( | |
a=1, | |
b=2, | |
c=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
aws workspaces describe-workspaces | jq '.Workspaces[] | select(.UserName=="josh").WorkspaceId' | xargs -I % aws workspaces start-workspaces --cli-input-json "$(aws workspaces start-workspaces --generate-cli-skeleton | sed 's/\"\"/\"%\"/')" |
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
redis-cli -h <HOST> -p <PORT> KEYS "<PATTERN>" | xargs -i% redis-cli -h <HOST> -p <PORT> DEL % | |
#easy mmode: | |
redis-cli KEYS "<pattern>" | xargs -i% redis-cli GET % |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
>>> print([m for m in dir(diffev.DiffEv) if m.startswith('set')]) | |
['set_autosave_func', 'set_autosave_interval', 'set_chunksize', 'set_create_trial', 'set_fitting_ended_func', 'set_fom_allowed_dis', 'set_km', 'set_kr', 'set_max_generation_mult', 'set_max_generations', 'set_max_log', 'set_parameter_output_func', 'set_plot_output_func', 'set_pop_mult', 'set_pop_size', 'set_processes', 'set_sleep_time', 'set_text_output_func', 'set_use_autosave', 'set_use_boundaries', 'set_use_max_generations', 'set_use_parallel_processing', 'set_use_pop_mult', 'set_use_start_guess', 'setup_parallel'] | |
>>> print([m for m in dir(model.Model) if m.startswith('')]) | |
['__doc__', '__init__', '__module__', '_read_from_file', '_reset_module', '_save_to_file', 'calc_fom', 'compile_script', 'create_fit_func', 'eval_in_model', 'evaluate_fit_func', 'evaluate_sim_func', 'export_data', 'export_script', 'export_table', 'get_data', 'get_data_as_asciitable', 'get_filename', 'get_fit_pars', 'get_fit_values', 'get_parameters', 'get_possible_param |