Skip to content

Instantly share code, notes, and snippets.

View pjjw's full-sized avatar

peter woodman pjjw

View GitHub Profile

Rails 2.3.11 on App Engine (DataMapper)

Do not use rvm (or install and run from JRuby). The google-appengine gem must install into your system MRI. The appengine-sdk gem includes a complete Java app server. We bootstrap Java from MRI, then your app runs inside a servlet container (with access to all the APIs) using the version of JRuby installed into each app.

We assumed Rails 2 would never work without rubygems, and we committed to gem bunlder for JRuby on App Engine, so we were waiting for Rails 3. Fortunately, Takeru Sasaki was able to patch the Rails 2.3.x calls to rubygems, and now we have it working. Rails 2.3.x currently spins up several seconds faster than Rails 3, and just a few seconds behind Sinatra.

See the TInyDS version also: gist.github.com/gists/269075

Install the Development Environment

@kamermans
kamermans / install-hiphop-fresh.sh
Created July 12, 2011 16:46
Script for installing and compiling HipHop for PHP on a fresh install of Ubuntu 11.04 x64
#!/bin/bash
# HipHop for PHP scripted installation
# by Steve Kamerman, July 12, 2011
echo -e "\e[00;31m**** Installing Prerequisites\e[00m"
sudo apt-get --yes install git-core cmake g++ libboost-dev libmysqlclient-dev libxml2-dev libmcrypt-dev libicu-dev openssl binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev autoconf libtool libcurl4-openssl-dev libboost-system-dev libboost-program-options-dev libboost-filesystem-dev wget memcached libreadline-dev libncurses-dev libmemcached-dev libicu-dev libbz2-dev libc-client2007e-dev php5-mcrypt php5-imagick libgoogle-perftools-dev
echo -e "\e[00;31m**** Getting HIPHOP in 5 seconds ****\e[00m"
@natduca
natduca / gist:1108568
Created July 27, 2011 03:00
Break into pdb on unittest assertion error
import unittest, exceptions, pdb
class PDBAssertionError(exceptions.AssertionError):
def __init__(self, *args):
exceptions.AssertionError.__init__(self, *args)
print "Assertion failed, entering PDB..."
if hasattr(sys, '_getframe'):
pdb.Pdb().set_trace(sys._getframe().f_back.f_back)
else:
pdb.set_trace()
unittest.TestCase.failureException = PDBAssertionError
@tornewuff
tornewuff / subl
Created January 16, 2013 00:28
Script to wrap Sublime Text 2 on Linux, handling proper background invocation and using rmate to edit remotely when not in an X session (the guess being that if there's no DISPLAY we are connected via ssh).
#!/bin/bash
if [ -z "$DISPLAY" ]; then
exec rmate "$@"
fi
for arg do
case $arg in
"-w" | "--wait") NEED_FOREGROUND=1;;
"-h" | "--help") NEED_FOREGROUND=1;;
@akihikodaki
akihikodaki / README.en.md
Last active July 25, 2024 12:07
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@halomakes
halomakes / _DSC1304.JPG
Last active July 19, 2023 18:43
AirGradient Pro ESPHome Configuration
_DSC1304.JPG