I want to listen to my music from command line,
but I have a meeting in 20 minutes!
timeout 20m pianobar || reset^ use this one
This will be an ongoing list for personal reference.
IsaacG - from exercism https://exercism.org/tracks/bash/exercises/hamming/solutions/IsaacG
The && and || in bash are short-circuit logical operators. They quit evaluating as soon as possible.
a && b will only run b if a is true. a || b will only run b if a is false. a || b || c will stop as soon as anything is true. a && b || c will run a and ... b or c or both!! This is why a full blown if-else is often a good idea.
( is a subprocess. The exit status of the subprocess does propagate to the parent shell. If you got set -e (not recommended), you'd get its exit status. But a subshell cannot exit the parent shell.
brew install postgresql;
brew services start postgresql;psql: error: FATAL: database "michaeldimmitt" does not exist
psql postgres;
postgres=# CREATE DATABASE michaeldimmitt with OWNER michaeldimmitt;
Looking at youtube blog, https://youtube-eng.googleblog.com/2018/08/control-your-360-videos-with-youtube.html
ran into the following code:
<!--[if IE]>
<script type="text/javascript"
src="https://www.blogger.com/static/v1/jsbin/1277698886-ieretrofit.js"Everyone seems to know this, but here is a good refresher in case I ever forget.
useEffect(() => { console.log('I am a component, 1 render') }, [true]);Pointed empty array works you dont need true, My paranoid self thought that I read in the documentation that empty array would track all. This was not the case.
useEffect(() => { console.log('I am a component, 1 render') }, []);| #!/usr/bin/env bash | |
| #{{{ MARK:Header | |
| #************************************************************** | |
| ##### Author: JACOBMENKE | |
| ##### Date: Mon Jul 10 12:10:25 EDT 2017 | |
| ##### Purpose: bash script to contain open, copy and paste commands | |
| ##### Notes: | |
| #}}}*********************************************************** | |
| if [[ -z "$ZPWR_OS_TYPE" ]]; then |
https://stackoverflow.com/a/332445/5283424
function a() { this.foo = 1;}
function b() { this.bar = 2; }
b.prototype = new a(); // b inherits from a
var f = new b();function type(obj){
return Object.prototype.toString.call(obj).match(/\s\w+/)[0].trim()