pidof systemd
2733
If this return a number then your system supports systemd. Most Linux distributions in 2017 support systemd.
Since systemd starts the process then all processes will be children of systemd
| 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); |
| // 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 |
| # 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!! |
| # Try listing the processes associated with a term, for example guake. | |
| $ pgrep guake | |
| 8494 | |
| # Kill guake processes without bothering looking at them. | |
| $ pkill guake |
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 postgresRecently 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.
| heroku config | sed 's/: */=/g; /^=/d' >> .env | |