Skip to content

Instantly share code, notes, and snippets.

@tfausak
tfausak / QQ.hs
Last active September 7, 2021 18:30
Haskell string quasi-quotation.
module QQ where
import qualified Language.Haskell.TH as TH
import qualified Language.Haskell.TH.Quote as TH
string :: TH.QuasiQuoter
string = TH.QuasiQuoter
{ TH.quoteDec = const $ fail "cannot be used as a declaration"
, TH.quoteExp = pure . TH.LitE . TH.StringL
, TH.quotePat = pure . TH.LitP . TH.StringL
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@unnitallman
unnitallman / gist:944011
Created April 27, 2011 10:11
sqlite with activerecord outside rails
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => ":memory:"
)