// jQuery
$(document).ready(function() {
// code
})NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| # Build file for lamp server | |
| # To build: | |
| # 1) Install docker (http://docker.io) | |
| # 2) Build: sudo docker build -t chris/php-5.5 . | |
| # 3) Run: sudo docker run -i -t -v /var/www:/var/www chris/php-5.5 /bin/bash | |
| # with the -v you can add a mount in 0.7 you should be able to use -h to provide a static ip | |
| FROM base:ubuntu-12.10 | |
| MAINTAINER Chris de Kok <chris.de.kok@gmail.com> |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| sass: { | |
| dist: { | |
| options:{ | |
| style:'compressed' | |
| }, | |
| files: { | |
| 'css/style.css' : 'scss/style.scss' |
| # Based on https://github.com/kripken/emscripten/wiki/Tutorial | |
| # prerequisites | |
| cd ~/ | |
| brew install node | |
| sudo ln -s /usr/bin/python2.7 /usr/bin/python2 | |
| curl http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-apple-darwin11.tar.gz > llvm.tgz | |
| tar xzvf llvm.tgz | |
| ln -s clang+llvm-3.2-x86_64-apple-darwin11 llvm |
-
Use Scantailor to clean up the scanned images.
-
Install the required tools with the following commands:
brew install --with-libtiff leptonica
brew install jbig2enc imagemagick tesseract
gem install iconv rmagick hpricot pdfbeadsSometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
- Get an OAuth Token from GitHub
First you will need to get an OAuth Token from GitHub using your own username and "note"
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ |