Skip to content

Instantly share code, notes, and snippets.

View jacksonp's full-sized avatar

Jackson Pauls jacksonp

  • Edinburgh, Scotland
View GitHub Profile
@jacksonp
jacksonp / our-git-model.markdown
Last active May 24, 2017 09:12
Our git model

Hot fixes go straight onto master. Everything else should be done in a feature branch that will get merged into master.

Git setup

Set autosetuprebase to avoid lots of little merges in new branches:

git config --global branch.autosetuprebase always

If a repo was cloned before enabling the above, set each of its branches to use rebase. E.g. for master:

@jacksonp
jacksonp / explain.sh
Last active September 18, 2021 15:04
Explaining Shell Commands in Bash
# Add this to ~/.bash_profile or ~/.bashrc
explain () {
if [ "$#" -eq 0 ]; then
while read -p "Command: " cmd; do
curl -Gs "https://www.mankier.com/api/v2/explain/?cols="$(tput cols) --data-urlencode "q=$cmd"
done
echo "Bye!"
elif [ "$#" -eq 1 ]; then
curl -Gs "https://www.mankier.com/api/v2/explain/?cols="$(tput cols) --data-urlencode "q=$1"
else
@jacksonp
jacksonp / index.html
Last active August 29, 2015 14:01
code for ScotchApp-0.0.1.apk
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
<style>
.app {
width: 300px;
margin: 0 auto;
}
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Meadows Tennis on Twitter" />
<Content type="html">
<![CDATA[
<a class="twitter-timeline" href="https://twitter.com/Meadows_Tennis_" data-widget-id="370851683951071232">Tweets by @Meadows_Tennis_</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
]]>
</Content>
</Module>