SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffers
This file contains hidden or 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 { spawnSync } from "child_process"; | |
/** | |
* Script to automate the git commit process with AI-generated commit messages. | |
* It checks for staged changes, generates a commit message, and prompts the user to review or edit the message before committing. | |
* Original source: https://microsoft.github.io/genaiscript/samples/gcm/ | |
*/ | |
script({ | |
title: 'Git Commit Message', |
This file contains hidden or 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
# get it ready | |
git bisect start | |
git bisect good c09c728 | |
git bisect bad e6a0692 | |
# give git a command to run against each commit | |
git bisect run rspec spec/features/my_broken_spec.rb |
This file contains hidden or 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/python | |
import numpy as np | |
import copy | |
num_simul = 10000 | |
# get initial standings | |
init_standings, past_perform, playoff_count = dict(), dict(), dict() | |
f = open('2016_week12_standings.txt'); lines = f.readlines(); f.close() | |
for line in lines[1:]: #skips header |
This file contains hidden or 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
module Math | |
# https://rosettacode.org/wiki/Evaluate_binomial_coefficients#Ruby | |
# binomial coefficient | |
def self.bc(n, k) | |
pTop = (n-k+1 .. n).inject(1, &:*) | |
pBottom = (2 .. k).inject(1, &:*) | |
pTop / pBottom | |
end | |
end |
This file contains hidden or 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
view the contents of your bucket: | |
aws s3 ls s3://mybucket | |
recursive uploads/downloads: | |
aws s3 cp myfolder s3://mybucket/myfolder --recursive | |
sync contents of local folder to bucket: | |
aws s3 sync myfolder s3://mybucket/myfolder --exclude *.tmp | |
https://console.aws.amazon.com/s3/home?region=us-west-2#&bucket=tipjarwellington&prefix=fonts/nexa/ |
This file contains hidden or 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
/Applications/Bitcoin-Qt.app/Contents//MacOS//Bitcoin-Qt -testnet |
This file contains hidden or 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
# # echo is like puts for bash (bash is the program running in your terminal) | |
echo "Loading ~/.bash_profile a shell script that runs in every new terminal you open" | |
# $VARIABLE will render before the rest of the command is executed | |
echo "Logged in as $USER at $(hostname)" | |
# Load RVM into a shell session *as a function* | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
# Path for RVM | |
test -d $HOME/.rvm/bin && PATH=$PATH:$HOME/.rvm/bin |