Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
class Users::SessionsController < Devise::SessionsController | |
# Have to reimplement :recall => "failure" | |
# for warden to redirect to some action that will return what I want | |
def create | |
resource = warden.authenticate!(:scope => resource_name, :recall => "failure") | |
# set_flash_message :notice, :signed_in | |
sign_in_and_redirect(resource_name, resource) | |
end | |
\documentclass{article} | |
\begin{document} | |
<<run-all, results='hide', message=FALSE>>= | |
library(xtable) | |
out = NULL | |
for (g in unique(mtcars$gear)) { | |
out = c(out, knit_child('template.Rnw', sprintf('gear-%s.tex', g))) | |
} |
display.cell <- function(x, bgcol="#DAE6F2", ...) { | |
opar <- par(bg=bgcol, mar=rep(0,4)) | |
plot(c(0,1), c(0,1), type="n", axes=FALSE, xlab="", ylab="") | |
text(.5, .5, as.character(x), ...) | |
lines(c(-0.1,1.1), c(0,0)) | |
par(opar) | |
} | |
format.digits <- function(x) as.character(paste("$", as.character(x), sep=" ")) |
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core \ | |
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \ | |
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison | |
&& | |
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
#! /bin/bash | |
# Author: Diego Valle-Jones | |
# Web: http://www.diegovalle.net | |
# Purpose: Download shapefiles of manzanas (blocks), agebs (census areas), ejes | |
# viales (streets), interesting areas and a whole bunch of other stuff | |
# Note that you'll need a recent version of innoextract | |
# http://constexpr.org/innoextract/, one that can work with files | |
# created by version 5.5 of Inno Setup, the one in Ubuntu universe is | |
# not recent enough. The version available at |
#! /bin/bash | |
# Author: Diego Valle-Jones | |
# Web: http://www.diegovalle.net | |
# Purpose: Download the shapefiles contained in the Mapa Digital de México | |
# comunicaciones y transportes | |
# cultura | |
# curvas de nivel | |
# hidrografia |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core \ | |
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \ | |
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison | |
&& | |
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled |