Skip to content

Instantly share code, notes, and snippets.

@jico
jico / blockstack
Last active March 23, 2018 16:29
Blockstack verification
Verifying my Blockstack ID is secured with the address 1CB177Vhxxd1xNaZt9rJwwUQWkRKqWPM8d https://explorer.blockstack.org/address/1CB177Vhxxd1xNaZt9rJwwUQWkRKqWPM8d
@jico
jico / keybase.md
Created July 24, 2016 14:04
Keybase proof

Keybase proof

I hereby claim:

  • I am jico on github.
  • I am jico (https://keybase.io/jico) on keybase.
  • I have a public key ASAvhV6ABQ6YcZMXGrtJGQpLYFMSrezNhyF3_5sRGjYBRQo

To claim this, I am signing this object:

// Log Angular exceptions to Sentry
$provide.decorator('$exceptionHandler', function($delegate) {
return function(exception, cause) {
$delegate(exception, cause);
Raven.captureException(exception, {
extra: {
cause: cause,
member_email: member.email
}
});
@jico
jico / iptables.firewall.rules
Created February 10, 2014 04:22
iptables rules.
*filter
# Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
@jico
jico / asset_disposer.sh
Last active January 4, 2016 20:39
Finds and removes possible unused assets in your Rails app.
#!/bin/bash
#
# Delete probably unused assets (images) under app/assets
for DIRECTORY in $(find app/assets -type d)
do
echo -e "Searching files in $DIRECTORY..."
for FILEPATH in $(find $DIRECTORY -type f -name '*.jpg' -o -name '*.jpeg' -o -name '*.gif' -o -name '*.png')
do
FILENAME=$(basename $FILEPATH)
# http://pad.squareup.com/457865
# Jico Baligod
# curl "http://pad.squareup.com/ep/pad/export/457865/latest?format=txt" > crawler.rb; ruby crawler.rb
# <a href='http://www.rubyinside.com/feed/'>RSS feed</a>
require 'net/http'
require 'uri'
<a href="#" class="btn"><i class="glyph-settings glyph-white"></i> Settings</a>
<a href="#" class="btn btn-info btn-large">
Next
<i class="glyph-circle_arrow_right glyph-white"></i>
</a>
@jico
jico / solarized.itermcolors
Created April 23, 2012 03:30
Little tweaked version of the Solarized theme for iTerm2.
<?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>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>