Skip to content

Instantly share code, notes, and snippets.

@GrooveStomp
GrooveStomp / unbounce_webhook_email.php
Created September 23, 2011 18:12
Unbounce WebHook Email
<?php
// This is a sample PHP script that demonstrates accepting a POST from the
// Unbounce form submission webhook, and then sending an email notification.
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
@GrooveStomp
GrooveStomp / gist:2313353
Created April 5, 2012 19:16
Integration Code Organization
module AuthenticatesExternally
extend ActiveSupport::Concern
included do
include AASM
aasm_column :state
aasm_initial_state :unconfigured
aasm_state :auth_new
aasm_state :auth_validate
aasm_state :configured
@GrooveStomp
GrooveStomp / gist:3901172
Created October 16, 2012 18:46
QT 4.7.4 Failed to build on OSX 10.7.5
~/Library/Logs/Homebrew/qt/02.make:
cd src/tools/bootstrap/ && make -f Makefile
/usr/bin/clang++ -c -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../mkspecs/macx-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -o .obj/release-static/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp
/usr/bin/clang++ -c -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarc
@GrooveStomp
GrooveStomp / gist:3901212
Created October 16, 2012 18:54
QT 4.7.4 Failed to build on OSX 10.7.5
~/Library/Logs/Homebrew/qt/02.make:
cd src/tools/bootstrap/ && /usr/bin/make -f Makefile
c++ -c -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../mkspecs/macx-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -o .obj/release-static/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp
c++ -c -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -
@GrooveStomp
GrooveStomp / gist:3902162
Created October 16, 2012 21:28
brew info qt
↳ brew info qt
qt: stable 4.7.4, HEAD
http://qt.nokia.com/
Not installed
https://github.com/mxcl/homebrew/commits/master/Library/Formula/qt.rb
==> Options
--universal
Build both x86_64 and x86 architectures.
--with-debug-and-release
Compile Qt in debug and release mode.
@GrooveStomp
GrooveStomp / brew info qt
Created October 16, 2012 22:04
Followup to qt issue.
↳ cd `brew --prefix`/Library/Formula
[aoman|/usr/local/Library/Formula|(69ecde6...)|ruby-1.8.7-p357]
↳ git checkout -- qt.rb
[aoman|/usr/local/Library/Formula|(69ecde6...)|ruby-1.8.7-p357]
↳ brew info qt
qt: stable 4.7.4, HEAD
http://qt.nokia.com/
Not installed
https://github.com/mxcl/homebrew/commits/master/Library/Formula/qt.rb
==> Options
@GrooveStomp
GrooveStomp / gist:3902412
Created October 16, 2012 22:18
brew install qt
↳ 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
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file src/corelib/global/qglobal.cpp
Hunk #1 succeeded at 1173 (offset -1 lines).
Hunk #2 succeeded at 1183 (offset -1 lines).
patching file src/corelib/global/qglobal.h
cd src/tools/bootstrap/ && /usr/bin/make -f Makefile
c++ -c -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../mkspecs/macx-g++ -I. -I../../../include -I../../../include/QtCore -I../../../include/QtXml -o .obj/release-static/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp
c++ -c -fvisibility=hidden -I/usr/X11/include -Xarch_x86_64 -mmacosx-version-min=10.5 -O2 -fPIC -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -
@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
#
@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'