Skip to content

Instantly share code, notes, and snippets.

@unnitallman
unnitallman / gist:944011
Created Apr 27, 2011
sqlite with activerecord outside rails
View gist:944011
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => ":memory:"
)
View ios-8-web-app.html
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/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
#
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created Jul 16, 2016
Pokemon Go decoded GAME_MASTER protobuf file v0.1
View GAME_MASTER_v0_1.protobuf
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@tfausak
tfausak / QQ.hs
Created Aug 30, 2017
Haskell string quasi-quotation.
View QQ.hs
module QQ where
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
string :: QuasiQuoter
string = QuasiQuoter
{ quoteDec = \ _ -> fail "cannot use [string|...|] quasi-quotation as a declaration"
, quoteExp = \ x -> pure (LitE (StringL x))
, quotePat = \ x -> pure (LitP (StringL x))
You can’t perform that action at this time.