Skip to content

Instantly share code, notes, and snippets.

Romain Guerin pomeh

Block or report user

Report or block pomeh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pomeh
pomeh / gist:a42207f11c74b7e6d7a6
Created Dec 26, 2015 — forked from atcuno/gist:3425484ac5cce5298932
HowTo: Privacy & Security Conscious Browsing
View gist:a42207f11c74b7e6d7a6

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@pomeh
pomeh / package.json
Created Oct 18, 2015 — forked from addyosmani/package.json
npm run-scripts boilerplate
View package.json
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
View flask-boilerplate-tmux.bash
#!/bin/bash
function flask-boilerplate-tmux
{
# https://github.com/swaroopch/flask-boilerplate
BASE="$HOME/code/flask-boilerplate"
cd $BASE
tmux start-server
tmux new-session -d -s flaskboilerplate -n model
@pomeh
pomeh / Default (Windows).sublime-keymap
Created Jan 14, 2015
Sublime Text 3 config example for sublime_findDoc package
View Default (Windows).sublime-keymap
// see Sublime Text package findDoc at https://github.com/zckrs/sublime_findDoc
[
// multiple shortcuts => multiple website
// aka: search on Google
{
"keys": ["ctrl+k", "ctrl+g"],
"command": "find_doc_selection",
"args" : {"url" : "https://google.fr/#q=%s" }
},
@pomeh
pomeh / copy-to-clipboard.js
Created Jul 27, 2014
JavaScript copy to clipboard function
View copy-to-clipboard.js
function copyToClipboard(value) {
var tbx = document.createElement('input')
document.body.appendChild(tbx);
tbx.value = value;
tbx.focus();
tbx.setSelectionRange(0, tbx.value.length);
document.execCommand("copy");
document.body.removeChild(tbx);
}
@pomeh
pomeh / node-http-proxy.js
Created Jan 4, 2014
Basic node.js Web proxy
View node-http-proxy.js
// inspired by Sébastien Chopin (atinux) at http://www.atinux.fr/2013/12/03/tricher-candy-crush-nodejs/
var http = require('http'),
request = require('request'),
port = 8080;
// this won't work for HTTPS URL
http.createServer(function onRequest (req, res) {
// this proxy only logs requests it receives
View Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]
View fresh-chrome.sh
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
View hola-hscript.frenchtv.json
{
"name": "French TV",
"description": "Watch French TV",
"author": "pomeh",
"unblocker_rules": {
"tf1": {
"description": "Watch TF1",
"link": "tf1.fr",
"icon": "http://www.tf1.fr/favicon.ico",
"cmds": [
@pomeh
pomeh / pr.md
Created Sep 17, 2012 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

You can’t perform that action at this time.