Skip to content

Instantly share code, notes, and snippets.

View paulodeleo's full-sized avatar

Paulo Henrique Deléo paulodeleo

  • Curitiba - PR, Brazil
View GitHub Profile
@jmnwong
jmnwong / ST2 Cycle Tabbing
Created June 28, 2013 15:24
Makes CTRL-Tab cycle tabs in order for Sublime Text.
Put in (Preferences -> Key Bindings - User):
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
@gdamjan
gdamjan / README.md
Last active May 3, 2024 07:59
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@jpatters
jpatters / HeidiDecode.js
Last active March 20, 2024 14:29
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
@tracend
tracend / handlebars.gravatar.js
Created November 22, 2012 11:46
Handlebars.js - Gravatar thumbnail #handlebars #cc
// Handlebars.js - Gravatar thumbnail
// Usage: {{#gravatar email size="64"}}{{/gravatar}} [depends on md5.js]
// Author: Makis Tracend (@tracend)
Handlebars.registerHelper('gravatar', function(context, options) {
var email = context;
var size=( typeof(options.hash.size) === "undefined") ? 32 : options.hash.size;
return "http://www.gravatar.com/avatar/" + MD5( email ) + "?s="+ size;
});
@shunchu
shunchu / convert-seconds-into-hh-mm-ss-in-ruby.rb
Created July 25, 2012 07:58
Convert seconds into HH:MM:SS in Ruby
t = 236 # seconds
Time.at(t).utc.strftime("%H:%M:%S")
=> "00:03:56"
# Reference
# http://stackoverflow.com/questions/3963930/ruby-rails-how-to-convert-seconds-to-time
@i-scorpion
i-scorpion / README.txt
Created June 18, 2012 12:24
Twitter bootstrap fixed table header using jQuery
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled.
Using the code from twitter bootstrap documentation page, this code is customized for table header.
Create the table with following layout -
<table class="table-fixed-header">
<thead class="header">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
@fnando
fnando / gist:2420869
Created April 19, 2012 13:10
My JavaScript Guidelines
@ambar
ambar / gist:1534274
Created December 29, 2011 14:15 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@filiptepper
filiptepper / rackup-kirk
Created March 8, 2011 11:02
start/stop/restart JRuby application running on Kirk
#! /bin/sh
set -u
NAME=<set your application name here>
DIRECTORY=<set your application directory here>
PIDFILE=/var/run/$NAME.pid
DAEMON="/usr/local/rvm/bin/rvm exec rackup"
DAEMON_ARGS="-s Kirk config.ru -p 3000 -P $PIDFILE"