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
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
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
$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
### 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
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
pip list --format columns | tail "-n $(expr $(pip list --format columns | wc -l) - 2)" | awk '{print $1}' | xargs -I {} bash -c "pip show {} | grep -v Summary | grep -v Home-page: | grep -v Author | grep -v Location | grep -v Requires | tr '\n' ' ' | awk '{print $1}'" | awk '{print $2,$4,$6}' |
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
find . -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- > /root/latest_files.txt |
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
from unittest import TestCase | |
import nose.tools as nt | |
def foo(x,y): | |
return (x+y), (x*y) | |
class FooTests_2(TestCase): | |
def __execute_foo(self, x, y): |
NewerOlder