Skip to content

Instantly share code, notes, and snippets.

View mattiasaxelsson's full-sized avatar

Mattias Axelsson mattiasaxelsson

View GitHub Profile
@mattiasaxelsson
mattiasaxelsson / minimal-analytics-snippet.min.js
Last active September 3, 2020 19:03 — forked from DavidKuennen/minimal-analytics-snippet.js
Minimal Analytics Snippet Compressed
!function(s,u){function v(){return e.cid||(e.cid=Math.random().toString(36)),e.cid}function i(e,t,o,n,i,r,a){var c,d="https://www.google-analytics.com/collect",l=function(e){var t=[];for(var o in e)e.hasOwnProperty(o)&&void 0!==e[o]&&t.push(g(o)+"="+g(e[o]));return t.join("&")}({v:"1",ds:"web",aip:u.anonymizeIp?1:void 0,tid:"XX-XXXXXXXXX-X",cid:v(),t:e||"pageview",sd:u.colorDepth&&screen.colorDepth?screen.colorDepth+"-bits":void 0,dr:p.referrer||void 0,dt:p.title,dl:p.location.origin+p.location.pathname+p.location.search,ul:u.language?(h.language||"").toLowerCase():void 0,de:u.characterSet?p.characterSet:void 0,sr:u.screenSize?(s.screen||{}).width+"x"+(s.screen||{}).height:void 0,vp:u.screenSize&&s.visualViewport?(s.visualViewport||{}).width+"x"+(s.visualViewport||{}).height:void 0,ec:t||void 0,ea:o||void 0,el:n||void 0,ev:i||void 0,exd:r||void 0,exf:void 0!==a&&0==!!a?0:void 0});h.sendBeacon?h.sendBeacon(d,l):((c=new XMLHttpRequest).open("POST",d,!0),c.send(l))}var t=s.history,p=document,h=navigator||{},e=lo

Keybase proof

I hereby claim:

  • I am mattiasaxelsson on github.
  • I am acke (https://keybase.io/acke) on keybase.
  • I have a public key whose fingerprint is F284 DD5B CEC6 7EB8 24A6 AC6C 0D74 1F62 958A 82B5

To claim this, I am signing this object:

@mattiasaxelsson
mattiasaxelsson / prompt.sh
Created November 23, 2012 11:43 — forked from tobiassjosten/prompt.sh
Colors for white background
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;30m\]'
c_path='\[\e[1;30m\]'
c_git_clean='\[\e[0;31m\]'
c_git_staged='\[\e[0;31m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=