Skip to content

Instantly share code, notes, and snippets.

Patrick Browne ptbrowne

Block or report user

Report or block ptbrowne

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
ptbrowne / tmux.conf
Last active Nov 11, 2015 — forked from spicycode/tmux.conf
My tmux conf
View tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
set-window-option -g pane-base-index 1
# No confirm before kill
bind-key x kill-pane
# Use ` as prefix
unbind C-b
set -g prefix `
ptbrowne /
Created Apr 7, 2014
Source bash environment files in Fish
function source_bash
exec /bin/bash -c "source $argv && exec fish"
View sequence-diagrams-tampermonkey.js
// ==UserScript==
// @name Sequence Diagram in Github
// @version 0.1
// @description Use to put sequence diagrams in Github
// @match*
// @require
// @require
// @run-at document-end
// example in Github Issues
ptbrowne / addscript.js
Created Jun 5, 2014
AddScript Bookmarklet
View addscript.js
javascript:(function(){(function(){var el=document.createElement('div'),b=document.getElementsByTagName('body')[0],otherlib=false,msg='';function getScript(url,success){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;success();script.onload=script.onreadystatechange=null;head.removeChild(script);}};head.appendChild(script);}getScript(prompt(),function(){if(typeof jQuery=='undefined'){msg='NOK';}else{msg='OK';if(otherlib){msg+=' and noConflict(). Use $jq(), not $().';}}return showMsg();});function showMsg(){console.log(msg)}})();})();
View jsbin.romeboqu.html
<!DOCTYPE html>
<meta name="description" content="Mobile Layout" />
<script src="//"></script>
<script src="//"></script>
<script src='//'></script>
<script src='//'></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
View gist:725da86c91e8df225fcd


Editeur: sublime text

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get install sublime-text

Custom keybindings

View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
function fish_prompt
if not set -q -g __fish_robbyrussell_functions_defined
set -g __fish_robbyrussell_functions_defined
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
View marionette.1.6.3.js
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v1.6.3
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license

git fix

Combines python-inquirer and git-amend-old to make git fix.

This gives you the possibility to amend a specific commit very easily.

Thanks to @magmax and @colinodell

You can’t perform that action at this time.