Skip to content

Instantly share code, notes, and snippets.

josephspurrier / values_pointers.go
Last active Aug 8, 2020
Golang - Asterisk and Ampersand Cheatsheet
View values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
Also available at:
p := Person{"Steve", 28} stores the value
johntyree /
Last active Aug 5, 2020
Make one large blocklist from the bluetack lists on
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
nrrrdcore / inset_input.css
Created Aug 9, 2012
The Perfect Inset Input CSS
View inset_input.css
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
tmichel / index.html
Created Nov 9, 2013
simple websocket example with golang
View index.html
<title>WebSocket demo</title>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
solusipse /
Last active May 31, 2020
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.


  1. Run script.
  2. Configure postgres to allow connections.
  3. Configure postfix admin. Remember to set these:
uhlenbrock / deploy.rb
Created Dec 14, 2011
Precompile assets locally for Capistrano deploy
View deploy.rb
load 'deploy/assets'
namespace :deploy do
namespace :assets do
desc 'Run the precompile task locally and rsync with shared'
task :precompile, :roles => :web, :except => { :no_release => true } do
%x{bundle exec rake assets:precompile}
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}}
%x{bundle exec rake assets:clean}
cblunt / Gemfile
Created Oct 21, 2011
Configure Carrierwave for Amazon S3 Storage and Heroku
View Gemfile
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
fduran / gist:1870502
Created Feb 20, 2012
Linux monitor & react to event in log file
View gist:1870502
# Linux. Act upon an event in a log file
apt-get upgrade; apt-get install inotify-tools
# create file
# example finding Exception in tomcat log and sending email
while inotifywait -e modify /path/to/file.log; do
flodel /
Created May 2, 2012
Basic Craigslist API
You can’t perform that action at this time.