Skip to content

Instantly share code, notes, and snippets.

View iphone.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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

ptbrowne /
Last active Aug 29, 2015
Toggle on/off Bluetooth from Spotlight

Easy toggle on, toggle off bluetooth

Thanks to blueutil, it is possible to toggle Bluetooth from Spotlight, you just have to put to download blueutil and put it in one of the directory of your $PATH, then put those two scripts somewhere.


View reorder-define.js
#! /usr/bin/env node
This script is used to enforce a convention on the order
of the imports in a project that use requirejs
It will transform define calls dependency order according
to a priority.
You can’t perform that action at this time.