Recently I had to delete a user from pagerduty, but the interface blocked me from doing so, saying that I couldn't complete the deletion until all of that users issues were resolved.
I looked at the unresolved issues and there were thousands.
function MorseNode(ac, rate) { | |
// ac is an audio context. | |
this._oscillator = ac.createOscillator(); | |
this._gain = ac.createGain(); | |
this._gain.gain.value = 0; | |
this._oscillator.frequency.value = 750; | |
this._oscillator.connect(this._gain); |
[ | |
["f", "Show next/latest diffs", "setProposedDiffBounds()"], | |
["n", "Next unreviewed file", "nextUnreviewedFile()"], | |
["p", "Previous unreviewed file", "prevUnreviewedFile()"], | |
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"], | |
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"], | |
["shift+n", "Next changed file", "nextChangedFile()"], | |
["shift+p", "Previous changed file", "prevChangedFile()"], | |
[null, "Next visible file", "nextVisibleFile()"], |
heroku config | sed 's/: */=/g; /^=/d' >> .env | |
Recently I had to delete a user from pagerduty, but the interface blocked me from doing so, saying that I couldn't complete the deletion until all of that users issues were resolved.
I looked at the unresolved issues and there were thousands.
More often than one might expect, I find myself setting up a new environment for rust development.
Here are some things that I end up doing repeatedly.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-watch
sudo apt install libpq-dev
cargo install diesel_cli --no-default-features --features postgres
# Try listing the processes associated with a term, for example guake. | |
$ pgrep guake | |
8494 | |
# Kill guake processes without bothering looking at them. | |
$ pkill guake |
# Source: https://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit | |
# Switch to the master branch and make sure you are up to date. | |
git checkout master | |
git fetch # this may be necessary (depending on your git config) to receive updates on origin/master | |
git pull | |
# Merge the feature branch into the master branch. | |
git merge feature_branch |
# Encrypt file | |
gpg -c --cipher-algo AES256 private-file.txt | |
# Decrypt it | |
gpg private-file.txt.gpg | |
# !!Don't forget the passphrase!! |
// Get html collection of images: | |
var imgs = document.getElementsByTagName('img') | |
// Convert to array | |
imgs = Array.from(imgs) | |
// Map to urls | |
var urls = imgs.map(img => img.src) | |
// Copy to clipboard |
In [1]: %load_ext autoreload | |
In [2]: %autoreload 2 | |
In [3]: from core.courses import questions | |
In [4]: questions.meaning_of_life() | |
Out[4]: 42 | |
In [5]: "Rewriting method" |