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
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
ptbrowne / source_bash.fish
Created Apr 7, 2014
Source bash environment files in Fish
View source_bash.fish
function source_bash
exec /bin/bash -c "source $argv && exec fish"
end
View sequence-diagrams-tampermonkey.js
// ==UserScript==
// @name Sequence Diagram in Github
// @version 0.1
// @description Use https://github.com/bramp/js-sequence-diagrams to put sequence diagrams in Github
// @match https://github.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.min.js
// @run-at document-end
// example in Github Issues
@ptbrowne
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>
<html>
<head>
<meta name="description" content="Mobile Layout" />
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/hammer.js/1.1.3/hammer.min.js'></script>
<script src='//cdn.jsdelivr.net/jquery.hammerjs/1.1.2/jquery.hammer-full.js'></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
View gist:725da86c91e8df225fcd

Config

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">
View fish_prompt.fish
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/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
View marionette.1.6.3.js
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v1.6.3
//
// Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
//
// http://marionettejs.com
View README.md

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

https://github.com/magmax/python-inquirer

You can’t perform that action at this time.