Skip to content

Instantly share code, notes, and snippets.

View fklingler's full-sized avatar

François KLINGLER fklingler

View GitHub Profile
@Soulou
Soulou / hijackhttps.go
Created July 21, 2013 10:45
I was looking to do HTTPS socket hijacking, here is the way to do ! The link between client and server are completely encrpted. Keywords : HTTPS TCP Socket Hijacking Golang
package main
import (
"crypto/tls"
"fmt"
"net"
"net/http"
"net/http/httputil"
"time"
)
@fklingler
fklingler / Markdown Preview Bookmarklet
Created January 29, 2013 19:18
This bookmarklet gives you a markdown editor/previewer in your browser in a single click.
data:text/html, <script type="text/javascript" src="https://raw.github.com/MrMitch/downatello/develop/downatello.js"></script><style type="text/css">#md,#html{position:absolute;top:0;bottom:0;padding:5px;border:none;outline:none;font-family:monaco,consolas,sans-serif;font-size:1em}#md{resize:none;left:0;right:50%;border-right:1px solid black}#html{left:50%;right:0;font-family:sans-serif}</style><textarea id="md" oninput="document.getElementById('html').innerHTML=downatello.toHtml(document.getElementById('md').value);"></textarea><div id="html"></div>
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end