Skip to content

Instantly share code, notes, and snippets.


Tim Sabat tsabat

View GitHub Profile
tsabat /
Last active May 25, 2021
Getting oh-my-zsh to work in Ubuntu


apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget -O - | zsh
tsabat / supervisor.conf
Created Dec 28, 2011
Sample supervisor config file
View supervisor.conf
; Sample supervisor config file.
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
tsabat /
Created Sep 7, 2013
a unique list of all connected redis clients
redis-cli client list | awk '{print $1}' | sed s/addr=//g | sed s/:.*//g | uniq
tsabat /
Created Feb 7, 2021 — forked from defulmere/
How to override an old sqlite3 module with pysqlite3 in django
# first: pip install pysqlite3-binary
# then in
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
'default': {
View HTML5-Audio-Player-w--Responsive-Playlist.markdown

HTML5 Audio Player w/ Responsive Playlist

I changed this!

This is an HTML5 audio player that detects the user agent of your device/browser/OS and applies styling that matches the native audio player. The playlist responds to the width of your screen and features basic UI controls.

Feel free to fork this pen and add your own user agent styles for different browsers, devices and operating systems.

tsabat /
Created Feb 22, 2014
delete unused ebs volumes
#! env python
from boto import ec2
conn = ec2.connect_to_region('us-west-2')
vols = conn.get_all_volumes(filters={'status': 'available'})
for vol in vols:
print 'checking vol:',, 'status:', vol.status, 'attachment_id:', vol.attach_data.status
View stuff.txt
1) "schedules_changed"
2) "stat:processed:2018-08-06"
3) "stat:failed:2018-09-06"
4) "stat:failed:2020-03-01"
5) "stat:failed:2020-01-12"
6) "stat:failed:2018-10-12"
7) "stat:processed:2018-09-01"
8) "stat:processed:2019-09-27"
9) "stat:failed:2020-02-23"
10) "stat:processed:2018-12-08"
tsabat /
Last active Mar 26, 2020
port forwarding bash script

We hide the services behind an AWS Security Group. But, we can use some trusty SSH action to forward localhost ports to those on the Solr server.

After you've added this to your ~/.zshrc or ~/.bash_profile and sourced (source ~/.bash_profile) it, you can forward these ports from localhost to your server like so:

portforward <hostname>

zsh and bash handle string splitting differently, so be sure to choose correctly for your shell.

View product.json
"product_id": "HL-104",
"product_name": "32-oz. Pail with Handle",
"description": "HumphreyLine 32-ounce pail is made with premium materials. Optional (non-decorated) White Lid available at US $0.25/CDN $0.50 (G) each. Optional Shovels also available at US $0.25/CDN $0.50 (G) each. Pail includes handle. Must specify handle color. Handles and Optional Shovels are available in: White, Red, Blue or Black. All optional accessories packed separately. Made in USA. FOB ZIP: KY, 41042",
"product_marketing_point_array": {
"product_marketing_point": {
"point_type": "downloads-Art Template",
"point_copy": "Click on the PDF link below to download: <br /><a href=\"/Lists/ReferenceMaterialLibrary/Bullet/Art_Templates/HL-104 32 oz Sand\" >HL-104 32 oz Sand Pail</a>"