curl -s https://gist.githubusercontent.com/ninowalker/aea5964256e2212a807c6d9e5e12051a/raw/top-brew-packages.txt \
| perl -ne 'print "$1 " if m%^(\w+):%' | xargs -n 5 brew install
function __rc_include {
local program; program=$1; shift
#!/bin/bash | |
# LICENSE: MIT | |
# Check if the required arguments are provided | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <input_audio_file:path> <minimum_length_of_silence:float>" | |
exit 1 | |
fi |
If your daily life means bouncing between github, JIRA, jenkins, AWS, etc... (and your team), you want to standardize shortcuts
https://www.ghacks.net/2018/03/30/custom-search-engines-in-google-chrome/
This script will update your preferences, and make for glorious browser efficiency.
function trickle_backlog() { | |
queue=$1 | |
backlog=$2 | |
max_depth=$3 | |
host=$4 | |
db=$5 | |
while [ $(redis-cli -h $host -n $db llen $backlog) -gt 0 ]; do | |
while [ $(redis-cli -h $host -n $db llen $queue) -gt $max_depth ]; do | |
echo "snoozing..." | |
sleep 1 |
# Based on | |
# http://stackoverflow.com/questions/15734219/simple-python-udp-server-trouble-receiving-packets-from-clients-other-than-loca | |
import socket | |
UDP_IP = "" | |
UDP_PORT = 8125 | |
sock = socket.socket(socket.AF_INET, # Internet | |
socket.SOCK_DGRAM) # UDP | |
sock.bind((UDP_IP, UDP_PORT)) |
(env)kevlar-1785 ~/dev/perseids $ make test_api | |
source env/bin/activate; /Users/nino/dev/perseids/env/bin/apirunner --log=INFO --ts=src/test/rester/suite.yaml | |
############################ FAILED ############################ | |
src/test/rester/ping.yaml : ping http | |
0. | |
Assert Statement : "text/plain; charset=UTF-8 == text/plain; charset=utf-8" ---> Fail! | |
-------- LOG OUTPUT -------- |
import pkg_resources | |
def get_pkg_license(pkgname): | |
""" | |
Given a package reference (as from requirements.txt), | |
return license listed in package metadata. | |
NOTE: This function does no error checking and is for | |
demonstration purposes only. | |
""" |
from lfcore.v2.fulfillment.stream.service import * | |
import time | |
m = MongoStreamSvc.instance() | |
for x in m.pubsub.find({'group': 'settings'}): | |
x | |
print "Looking in events..." | |
t = list(m.events.find({'group': 'settings'})) | |
t |
- issuetype: Story | |
project: LF | |
reporter: nino | |
components: Spam | |
assignee: eugene | |
- manifest: | |
fixVersions: Narnia | |
links: | |
- key: PP-146 | |
type: relates to |
(global-set-key (kbd "C-x C-\\") 'jira-open) | |
(global-set-key (kbd "C-x C-/") 'jira-run) | |
(setq jy_username "...") | |
(setq jy_password "...") | |
(setq jy_server "https://livefyre.atlassian.net") | |
(defun jira-open () | |
(interactive) | |
(shell-command |