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 logging | |
from datetime import datetime | |
import time | |
def timed(method): | |
def _timed(*args, **kwargs): | |
start_time = time.time() | |
result = method(*args, **kwargs) | |
end_time = time.time() |
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
$the_cow = <<EOC; | |
$thoughts _=_ | |
$thoughts q(-_-)p | |
$thoughts '_) (_` | |
/__/ \\ | |
_(<_ / )_ | |
(__\\_\\_|_/__) | |
EOC | |
# this might be a comment |
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
function validate(httpReq) { | |
const body = JSON.parse(httpReq.body); | |
if (!body.hasOwnProperty('name')) { | |
throw new Error('invalid request'); | |
} | |
} |
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
# for details see this article | |
# https://medium.com/@jonathan.leitschuh/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5 | |
lsof -i :19421 | tail -1 | awk '{print $2}' | xargs -I {} kill -9 {} && rm -Rf ~/.zoomus && touch ~/.zoomus |
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
# with a progress bar | |
dd if=/Users/rich/Downloads/kali-linux-2016.1-amd64.iso | pv | dd of=/dev/disk2 bs=1m |
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
pair = :you | |
pear = :fruit | |
join = :happy | |
pair | |
pair | |
pair | |
pear | |
pair | |
pair | |
pair |
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
### Keybase proof | |
I hereby claim: | |
* I am rdammkoehler on github. | |
* I am individualrich (https://keybase.io/individualrich) on keybase. | |
* I have a public key ASA7Htyss5Qw0rmd4M7KRRl-Bhlrtlbp8vc4FFm26bCdQQo | |
To claim this, I am signing this object: |
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
[user] | |
name = Rich Dammkoehler | |
email = rpd@noradltd.com | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
showbranch = auto | |
[alias] | |
b = branch |
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
sudo du -kx 2>/dev/null | sort -nr > /tmp/du-k.sort |
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
#!/bin/bash | |
state=`osascript -e 'tell application "iTunes" to player state as string'` | |
if [ $state == 'playing' ]; | |
then | |
artist=`osascript -e 'tell application "iTunes" to artist of current track as string'` | |
track=`osascript -e 'tell application "iTunes" to name of current track as string'` | |
message="$USER is listening to $track by $artist" |
NewerOlder