Skip to content

Instantly share code, notes, and snippets.

@GrooveStomp
GrooveStomp / crash.log
Created June 18, 2013 23:28
nanoc issue
Crashlog created at 2013-06-18 16:25:55 -0700
===== MESSAGE:
LoadError: cannot load such file -- sass
Make sure the gem is added to Gemfile and run `bundle install`.
===== COMPILATION STACK:
- [item] /assets/style/_variables/ (rep default)
@GrooveStomp
GrooveStomp / api_datetime_spec.rb
Created June 13, 2013 23:31
Spec exercising date/time usage with the API
# Requirements for this shared example:
# - api_key: ApiKey class instance used for authentication.
# - factory: Name of FactoryGirl factory as a symbol.
# - deps: Hash of dependencies to pass into FactoryGirl.create.
# - params: Parameters to fulfill #index request.
#
# collection: Name to inspect in the resultset.
# See: https://api.unbounce.com/doc/pages#collection_overview
# In the sample responses there, `collection` should be 'pages'.
#
@GrooveStomp
GrooveStomp / d_array_test_failure
Created March 20, 2013 19:28
dmd errors for d_array_test sample.
↳ dmd array.d
Undefined symbols for architecture x86_64:
"__Dmain", referenced from:
_main in libphobos2.a(dmain2_461_1a5.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
--- errorlevel 1
Error: no main function specified
bool binarySearch(T)(T[] input, T value) {
while (!input.empty) {
auto i = input.length / 2;
auto mid = input[i];
if (mid > value) input = input[0 .. i];
else if (mid < value) input = input[i + 1 .. $];
else return true;
}
return false;
}
@GrooveStomp
GrooveStomp / d_output
Created March 20, 2013 06:25
Trying to build D samples.
↳ gdc bin_search.d -unittest
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgphobos2.a(dmain2.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv':
(.text+0x5dd): undefined reference to `_Dmain'
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgphobos2.a(thread.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
(.text+0x44): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgphobos2.a(thread.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread':
(.text+0x4b): undefined reference to `_tlsend'
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgphobos2.a(thread.o): In function `_D4core6thread6Thread6__ctorMFPFZvmZC4core6thread6Thread':
(.text+0xe7c): undefined reference to `_tlsstart'
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgphobos2.a(thread.o): In function `_D4core6thread6Thread6__ctorMFPFZvmZC4core6thread6Thread':
@GrooveStomp
GrooveStomp / ub-api-page-stats-jsonp
Created March 7, 2013 20:52
Javascript sample for using the API to grab some page stats info.
var page_id = "6c95858a-85fc-11e2-82b1-12313e0080a1";
$(document).ready(function() {
var url = "https://secret-island-6724.herokuapp.com/page-stats-jsonp/" + page_id;
$.ajax({
"url": url,
"dataType": "jsonp",
"jsonp": "jsonp"
})
@GrooveStomp
GrooveStomp / gist:3909005
Created October 17, 2012 23:31
QT 4.7 Install
↳ cd `brew --prefix`
[aoman|/usr/local|master|ruby-1.8.7-p357]
↳ git checkout 83f742e15 /usr/local/Library/Formula/qt.rb
[aoman|/usr/local|master|ruby-1.8.7-p357]
↳ brew install libpng
Error: libpng-1.5.13 already installed
[aoman|/usr/local|master|ruby-1.8.7-p357]
↳ brew install --use-llvm --env=std qt
==> Downloading http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
Already downloaded: /Users/aoman/Library/Caches/Homebrew/qt-4.7.4.tar.gz
@GrooveStomp
GrooveStomp / gist:3902717
Created October 16, 2012 23:27
Verbose Qt 4.7 Homebrew build attempt
↳ HOMEBREW_LOG=1 VERBOSE=1 brew install qt
==> Downloading http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
Already downloaded: /Users/aoman/Library/Caches/Homebrew/qt-4.7.4.tar.gz
/usr/bin/tar xf /Users/aoman/Library/Caches/Homebrew/qt-4.7.4.tar.gz
==> Downloading patches
/usr/bin/curl -qf#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.7.5) https://qt.gitorious.org/qt/qt/commit/1766bbdb53e1e20a1bbfb523bbbbe38ea7ab7b3d?format=patch -o 000-homebrew.diff
######################################################################## 100.0%
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file src/corelib/global/qglobal.cpp
@GrooveStomp
GrooveStomp / gist:3902479
Created October 16, 2012 22:31
brew cat qt
↳ brew cat qt
require 'formula'
require 'hardware'
class Qt < Formula
url 'http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz'
md5 '9831cf1dfa8d0689a06c2c54c5c65aaf'
homepage 'http://qt.nokia.com/'
bottle 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.7.4-bottle.tar.gz'
bottle_sha1 '3195cddb76c0d13b4500dc75cc55f20f00c10ef1'
@GrooveStomp
GrooveStomp / gist:3902477
Created October 16, 2012 22:31
brew status
↳ cd `brew --prefix`
[aoman|/usr/local|master|ruby-1.8.7-p357]
↳ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Library/Formula/qt.rb
#