Skip to content

Instantly share code, notes, and snippets.


Paul Sebborn psebborn

  • Zoocha
  • Hertford
View GitHub Profile

#Merging with graphical diff tools

First things first

It's worth trying to just run git difftool or git mergetool as by default most Git installations will configure your OS's diff tool (Meld for Ubuntu, and FileMerge / Opendiff for OSX).

There are two ways of updating the merge tools that Git will use by default. The first is to copy the config straight into your .gitconfig file (usually in your home folder). If you're not happy doing that you can use git config, e.g.:

git config --global diff.tool diffmerge
git config --global diffmerge.cmd "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
View gist:e2f9522a7777d473adcad112b8e16b3f
### Keybase proof
I hereby claim:
* I am psebborn on github.
* I am sebbornidentity ( on keybase.
* I have a public key whose fingerprint is 7780 F00C 4E5C 726B A63C A13D 9A18 4FC4 A439 DB01
To claim this, I am signing this object:
psebborn / sentence-case.sass
Last active Oct 21, 2017
Sentence case for CSS
View sentence-case.sass
// CSS doesn't have a text-transform: sentence case,
// so here's a little mixin to spoof it for you
@mixin sentence-case() {
text-transform: lowercase;
&:first-letter {
text-transform: uppercase;
psebborn / countCSSRules.js
Last active Jan 8, 2020
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
View countCSSRules.js
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
for (var i = 0; i < document.styleSheets.length; i++) {
function countSheet(sheet) {
You can’t perform that action at this time.