Skip to content

Instantly share code, notes, and snippets.

-- to be run as main postgres user
-- remove default public permissions and only allow migration user, on the app db
-- public (lower case) is for the schema public.
-- PUBLIC (upper case) means "for all users".
\c {}
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
GRANT CREATE ON SCHEMA public TO {}_usermigrate;
ALTER USER {}_usermigrate WITH NOCREATEDB;
#!/bin/bash
# Bash script by Tim Schwartz, http://www.timschwartz.org/raspberry-pi-video-looper/ 2013
# Comments, clean up, improvements by Derek DeMoss, for Dark Horse Comics, Inc. 2015
# Added USB support, full path, support files with spaces in names, support more file formats - Tim Schwartz, 2016
# Version 0.3.3, fix: removed -r parameter from omxplayer.
# Version 0.3.2, fix: filemane 03.jpg is displayed for default delay, not 3 seconds.
# Version 0.3.1, added html support.
# Version 0.3.0, added 'pqiv -f -i blank.png&' to open blank image. This hides desktop elements.
# Version 0.2, added fbi for displaying images
@anilgulecha
anilgulecha / abtester.rb
Created December 1, 2018 18:56
THINK 320k mp3s are better than 96k mp3? TAKE THE BIT RATE CHALLENGE. On your commandline.
# THINK 320k mp3s are better than 96k mp3?
# TAKE THE BIT RATE CHALLENGE!
# Needs ruby, ffmpeg and mplayer on your commandline.
# Some sample flac files can be found at:
# http://www.eclassical.com/pages/24-bit-faq.html
# http://www.2l.no/hires/
# http://www.findhdmusic.com/high-res-audio/free-music/
# LICENSE: This scripe is released under Public Domain.
@anilgulecha
anilgulecha / keybase.md
Created February 4, 2017 05:39
keybase.md

Keybase proof

I hereby claim:

  • I am anilgulecha on github.
  • I am anilg (https://keybase.io/anilg) on keybase.
  • I have a public key ASCUzwhUMgT_y5DXtD1xqz4to6SEMClHaE1f_Vz64T9Jdwo

To claim this, I am signing this object:

cat >/etc/apt/preferences.d/saucy-proposed <\EOF
Package: *
Pin: release a=saucy-proposed
Pin-Priority: 400
EOF
cat >/etc/apt/sources.list.d/saucy-proposed.list <\EOF
deb http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe
EOF