Skip to content

Instantly share code, notes, and snippets.

@silviopaganini
silviopaganini / appliness.js
Created July 25, 2013 13:46
Download the latest Appliness PDF
var http = require('http'),
fs = require('fs'),
$ = require('jquery');
var issues = [];
function downloadIssue()
{
var lastIndexSlash = issues[0].lastIndexOf('/') + 1;
var filename = issues[0].substring(lastIndexSlash, issues[0].length);
@silviopaganini
silviopaganini / giga.sh
Created July 25, 2013 13:53
Clean up the directories for Gigapix Image
# directory with the gigapic
cd giga
for (( i = 2; i < 11; i++ )); do
rm $i.html
cd $i"_img"
echo `pwd`
rm ImageProperties.xml
rm zoomifyViewer.swf
mkdir a
@silviopaganini
silviopaganini / gist:7067252
Created October 20, 2013 09:48
Sublime User Key Bindings
[
{ "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+up"], "command": "swap_line_up" },
{ "keys": ["super+down"], "command": "swap_line_down" },
]
@silviopaganini
silviopaganini / facebook.coffee
Created November 23, 2013 19:05
Facebook notification
@sendTreeNow : (id, tree_id, complete, fail) =>
# TODO get message data
template = "@[#{Facebook.user.id}] gifted you a tree in the Amazon. Name it now."
url = (window or document).location.origin + "trees/#{tree_id}"
$.get "https://graph.facebook.com/oauth/access_token?client_id=#{window.config.fb_app}&client_secret=#{window.config.fb_secret}&grant_type=client_credentials", (data) =>
str = "https://graph.facebook.com/"
str += "#{id}/"
#!/bin/bash
PS1="\u\e[1;31m \W\e[m $ "
alias ll="ls -lahG"
alias sniff="sudo ngrep -W byline -d 'en0' -t '^(GET|POST) ' 'tcp and port 8888'"
alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'
alias gp='git pull origin master'
<?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>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjMwNTg4MjM1MjkgMC4zMDU4ODIzNTI5IDAuMzA1ODgyMzUyOQAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
[
{ "keys": ["super+shift+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+up"], "command": "swap_line_up" },
{ "keys": ["super+down"], "command": "swap_line_down" },
{ "keys": ["super+0"],
"command": "insert_snippet",
"args": {
"contents": "\nconsole.log('$SELECTION', ${1:}$SELECTION)${0}\n"
}
}
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Eighties.tmTheme",
"fade_fold_buttons": false,
"font_size": 11,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
@silviopaganini
silviopaganini / Gulpfile.js
Last active January 3, 2016 05:39
Gulp require snippet for all devDependencies
gulp = require('gulp');
pkg = require('./package.json');
for (k in pkg.devDependencies) {
v = pkg.devDependencies[k];
a = k.indexOf('gulp-') > -1 ? k.split('gulp-')[1] : k;
GLOBAL[a] = require(k);
}
@silviopaganini
silviopaganini / profanity.txt
Created February 4, 2014 17:51
English simple Profanity list
@$$
damn
dyke
fuck
shit
2g1c
2girls1cup
acrotomophilia
ahole
amcik