This file contains hidden or 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
CFLAGS="-I/usr/local/opt/openssl/include" \ | |
LDFLAGS="-L/usr/local/opt/openssl/lib" \ | |
pip install cryptography |
This file contains hidden or 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/sh | |
docker ps -a | awk '/Exited/ { print $1 }' | xargs -n 1 docker rm | |
docker images | awk '/<none>/ { print $3 }' | xargs -n 1 docker rmi |
This file contains hidden or 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 frameworkpython { | |
if [[ ! -z "$VIRTUAL_ENV" ]]; then | |
PYTHONHOME=$VIRTUAL_ENV /usr/bin/python "$@" | |
else | |
/usr/bin/python "$@" | |
fi | |
} | |
function jupyter { | |
jcmd=$1 |
This file contains hidden or 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
# x86_64 | |
# | |
CONFIG_64BIT=y | |
# CONFIG_X86_32 is not set | |
CONFIG_X86_64=y | |
CONFIG_X86=y | |
CONFIG_OUTPUT_FORMAT="elf64-x86-64" | |
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" | |
CONFIG_GENERIC_CMOS_UPDATE=y | |
CONFIG_CLOCKSOURCE_WATCHDOG=y |
This file contains hidden or 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
brew install daemontools | |
sudo mkdir /service /var/service | |
sudo chown $USER /service /var/service | |
cat <<EOF> ~/Library/LaunchAgents/homebrew.mxcl.daemontools.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> |
This file contains hidden or 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
17:16 < itai> KARACHI (Staff Report) - A hand grenade exploded inside courtroom in Karachi's Anti-Terrorism Court (ATC) after a judge asked a police constable if he knew how | |
grenades worked. | |
17:16 < itai> The constable, instead of explaining his expertise in weapons and grenade handling to the judge, opted to demonstrate practically by promptly pulling out the pin from | |
the grenade. | |
17:17 < itai> This resulted in a loud explosion, injuring five including the judge, the constable and a court clerk. | |
17:17 < Herk> lol | |
17:17 < itai> i would say that demonstration was...highly effective | |
17:36 < gleam> he did a bang-up job | |
17:41 < itai> you could say his testimony had quite an impact | |
17:43 < gleam> it was a bombshell |
This file contains hidden or 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/sh | |
if [ $# -ne 1 ]; then | |
echo "${0} <directory of PEMs>" | |
exit 1 | |
fi | |
certdir=${1} | |
if [ -z "${certdir}" ]; then | |
echo "Must specify path to directory of PEMs" |
This file contains hidden or 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
server { | |
listen 80; | |
server_name observium.yourdomain.com; | |
access_log /var/log/nginx/observium-access_log combined; | |
error_log /var/log/nginx/observium-error_log warn; | |
root /opt/observium/html; | |
client_max_body_size 10m; | |
client_body_buffer_size 8K; |
This file contains hidden or 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
$ ~/cidrdns -q 4.68.3.0/24 | |
4.68.3.4: lo-0.err1-old.losangeles1.level3.net | |
4.68.3.5: lo-0.err2-old.losangeles1.level3.net | |
4.68.3.27: lo-0.bbr1.denver1.level3.net | |
4.68.3.28: lo-0.bbr2.denver1.level3.net | |
4.68.3.29: lo-0.car1.losangeles1.level3.net | |
4.68.3.30: lo-0.car2.losangeles1.level3.net | |
4.68.3.31: lo-0.car1.chicago1.level3.net | |
4.68.3.32: lo-0.car2.chicago1.level3.net | |
4.68.3.33: lo-0.car1.boston1.level3.net |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import json | |
import pika | |
import requests | |
def queue_callback(channel, method, properties, body): | |
msg = json.loads(body) |