Skip to content

Instantly share code, notes, and snippets.

Avatar

Rich Dammkoehler rdammkoehler

View GitHub Profile
@rdammkoehler
rdammkoehler / kill_zoom_server.sh
Created Jul 9, 2019
Mac Users: Kill the Zoom.us server running on your machine and disable it permanently in one line!
View kill_zoom_server.sh
# 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
View pairing.rb
pair = :you
pear = :fruit
join = :happy
pair
pair
pair
pear
pair
pair
pair
@rdammkoehler
rdammkoehler / monk.cow
Created Jun 26, 2018
A Monk for cowsay
View monk.cow
$the_cow = <<EOC;
$thoughts _=_
$thoughts q(-_-)p
$thoughts '_) (_`
/__/ \\
_(<_ / )_
(__\\_\\_|_/__)
EOC
View gist:37a366641d2a93bd7dd0f9e6aa7310e5
### 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:
@rdammkoehler
rdammkoehler / find_largest.sh
Last active Apr 16, 2018
Find the Largest Files on your Disk
View find_largest.sh
sudo du -kx 2>/dev/null | sort -nr > /tmp/du-k.sort
@rdammkoehler
rdammkoehler / collect_versions.sh
Created Mar 8, 2018
A one-liner to collect the versions of all your python dependancies via pip.
View collect_versions.sh
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}'
View latest_files.sh
find . -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- > /root/latest_files.txt
@rdammkoehler
rdammkoehler / foo.py
Last active May 15, 2017
Moise Foo.py
View foo.py
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):
@rdammkoehler
rdammkoehler / foo.py
Last active May 15, 2017
Super DRY Foo Test
View foo.py
from unittest import TestCase
import nose.tools as nt
def foo(x,y):
return (x+y), (x*y)
class FooTests_1(TestCase):
def setUp(self):
@rdammkoehler
rdammkoehler / foo.py
Created May 15, 2017
Undry Impl of Foo.py
View foo.py
from unittest import TestCase
import nose.tools as nt
def foo(x,y):
return (x+y), (x*y)
class FooTests_0(TestCase):
def test_foo_does_add(self):