Skip to content

Instantly share code, notes, and snippets.

@mietek
mietek / giterdun.sh
Created July 3, 2013 12:58
Better git diff for branches which had stuff merged in
# Example:
#
# giterdun 339f7db..6ed04fa
# git diff | $EDITOR
# BRANCH=`git rev-parse --abbrev-ref HEAD` && git checkout . && git checkout master && git branch -D $BRANCH
giterdun()
{
RANGE=$1
SHAS=`git log --no-merges --first-parent --pretty=%h --reverse $RANGE`
@mietek
mietek / SassMeister-input-HTML.html
Created January 13, 2014 21:28
Generated by SassMeister.com.
<article class="calendar">
<header class="calendar">
<ul class="weekdays">
<li class="weekday mon"><span class="weekday">Mon</span></li>
<li class="weekday tue"><span class="weekday">Tue</span></li>
<li class="weekday wed"><span class="weekday">Wed</span></li>
<li class="weekday thu"><span class="weekday">Thu</span></li>
<li class="weekday fri"><span class="weekday">Fri</span></li>
<li class="weekday sat"><span class="weekday">Sat</span></li>
<li class="weekday sun"><span class="weekday">Sun</span></li>
@mietek
mietek / _prefix.sass
Last active August 29, 2015 13:56
Useful CSS prefixes
@mixin box-sizing($value)
-moz-box-sizing: $value
box-sizing: $value
@mixin hyphens
-webkit-hyphens: auto
-moz-hyphens: auto
-ms-hyphens: auto
hyphens: auto
@mietek
mietek / hello-snap.diff
Created April 22, 2014 22:53
How to connect a Snap app to Heroku Postgres
diff --git a/hello-snap.cabal b/hello-snap.cabal
index c759d41..af67b1a 100644
--- a/hello-snap.cabal
+++ b/hello-snap.cabal
@@ -31,6 +31,7 @@ Executable hello-snap
snap-core >= 0.9 && < 0.11,
snap-server >= 0.9 && < 0.11,
snap-loader-static >= 0.9 && < 0.10,
+ snaplet-postgresql-simple >= 0.5 && < 0.6,
text >= 0.11 && < 1.2,
@mietek
mietek / cabal-freeze-v3-reorder-goals.out
Created May 20, 2014 13:42
Attachments for haskell/cabal#1872 — cabal-install-1.20.0.1
$ cabal freeze -v3 --reorder-goals
Using a sandbox located at /private/tmp/yesod-platform-test/.cabal-sandbox
Reading available packages...
Reading installed packages...
("/opt/bin/ghc-pkg",["dump","--package-db=/private/tmp/yesod-platform-test/.cabal-sandbox/x86_64-osx-ghc-7.8.2-packages.conf.d","-v0"])
("/opt/bin/ghc",["--print-libdir"])
Found no modified add-source deps.
Reading installed packages...
("/opt/bin/ghc-pkg",["dump","--global","-v0"])
("/opt/bin/ghc-pkg",["dump","--package-db=/private/tmp/yesod-platform-test/.cabal-sandbox/x86_64-osx-ghc-7.8.2-packages.conf.d","-v0"])
@mietek
mietek / cabal-freeze-v3-reorder-goals.out
Last active August 29, 2015 14:01
More attachments for haskell/cabal#1872 — cabal-install-1.20.0.2
# cabal freeze -v3 --reorder-goals
Using a sandbox located at /tmp/yesod-platform-test/.cabal-sandbox
Reading available packages...
Reading installed packages...
("/app/.halcyon/ghc/active/bin/ghc-pkg",["dump","--package-db=/tmp/yesod-platform-test/.cabal-sandbox/x86_64-linux-ghc-7.8.2-packages.conf.d","-v0"])
("/app/.halcyon/ghc/active/bin/ghc",["--print-libdir"])
Found no modified add-source deps.
Reading installed packages...
("/app/.halcyon/ghc/active/bin/ghc-pkg",["dump","--global","-v0"])
("/app/.halcyon/ghc/active/bin/ghc-pkg",["dump","--package-db=/tmp/yesod-platform-test/.cabal-sandbox/x86_64-linux-ghc-7.8.2-packages.conf.d","-v0"])
--- raw.cabal.config 2014-05-29 18:50:35.000000000 +0100
+++ canonised.cabal.config 2014-05-29 18:49:57.000000000 +0100
@@ -12,9 +12,9 @@
attoparsec ==0.11.3.4,
attoparsec-conduit ==1.1.0,
authenticate ==1.3.2.8,
- base ==4.7.0.0,
base16-bytestring ==0.1.1.6,
base64-bytestring ==1.0.0.1,
+ base ==4.7.0.0,
@mietek
mietek / halcyon-20140602.txt
Created June 2, 2014 08:14
Halcyon 2014-06-02
linux-ubuntu-10-04-x64/halcyon-cabal-1.20.0.2-20140602053547.tar.xz
linux-ubuntu-10-04-x64/halcyon-cabal-1.20.0.2.tar.xz
linux-ubuntu-10-04-x64/halcyon-ghc-7.6.3.tar.xz
linux-ubuntu-10-04-x64/halcyon-ghc-7.8.2.tar.xz
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.6.3-base-4.6.0.1-cfd4fabd55f46d3043050bd13bee1740ee134f96.cabal.config
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.6.3-base-4.6.0.1-cfd4fabd55f46d3043050bd13bee1740ee134f96.tar.gz
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.8.2-Spock-0.5.1.0-662ac34ee567f41d6ed34fcbb17b7a26f0ec0cca.cabal.config
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.8.2-Spock-0.5.1.0-662ac34ee567f41d6ed34fcbb17b7a26f0ec0cca.tar.gz
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.8.2-base-4.7.0.0-82fddfcd641582152aa7dc64e7729724af1bb576.cabal.config
linux-ubuntu-10-04-x64/halcyon-sandbox-ghc-7.8.2-base-4.7.0.0-82fddfcd641582152aa7dc64e7729724af1bb576.tar.gz
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","/usr/bin/gcc")
,("C compiler flags"," -m64 -fno-stack-protector")
,("C compiler link flags"," -m64")
,("ld command","/usr/bin/ld")
,("ld flags"," -arch x86_64")
,("ld supports compact unwind","YES")
,("ld supports build-id","NO")
,("ld supports filelist","YES")
/*
* Copyright (c) 2007-2011 by Apple Inc.. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this