# supports only notice and alert by default
# the rest has to go into flash hash
redirect_to :index, notice: "success"
redirect_to :new, notice: "errors"
redirect_to :new, flash: { success: "yeah" }
flash[:info] = "updated"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if &compatible | |
set nocompatible | |
end | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim/ | |
call vundle#begin() | |
" Let Vundle manage Vundle | |
Plugin 'gmarik/Vundle.vim' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -i | |
cd | |
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xzvf ImageMagick-6.8.9-1.tar.gz | |
cd ImageMagick-6.8.9-1/ | |
./configure --prefix=/opt/imagemagick-6.8 && make | |
checkinstall |
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
- postgresql
- postgresql-client
- libpq-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country | CountryCode | Currency | Code | |
---|---|---|---|---|
New Zealand | NZ | New Zealand Dollars | NZD | |
Cook Islands | CK | New Zealand Dollars | NZD | |
Niue | NU | New Zealand Dollars | NZD | |
Pitcairn | PN | New Zealand Dollars | NZD | |
Tokelau | TK | New Zealand Dollars | NZD | |
Australian | AU | Australian Dollars | AUD | |
Christmas Island | CX | Australian Dollars | AUD | |
Cocos (Keeling) Islands | CC | Australian Dollars | AUD | |
Heard and Mc Donald Islands | HM | Australian Dollars | AUD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
# testing rake task app:awesome_report | |
# defined in file lib/tasks/app/awesome_report.rake | |
describe 'App::AwesomeReportTaskTest' do | |
it 'generates the awesomeness report' do | |
subject.invoke | |
assert File.exists?('awesomeness_report.csv') | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="redux react todo list example <filter todos>"> | |
<script src="https://fb.me/react-0.14.7.min.js"></script> | |
<script src="https://fb.me/react-dom-0.14.7.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.0.4/redux.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="redex react todo list example add todo"> | |
<script src="https://fb.me/react-0.14.7.min.js"></script> | |
<script src="https://fb.me/react-dom-0.14.7.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.0.4/redux.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> |
Contours of San Francisco overlayed over OpenStreeMap vector tiles using code from mbostock's vector tiles with multiple layers example. View the hi-res file
See gist for code used to generate contours.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This scripts merges subtitles (if present) and transcodes video files | |
# to H.264 mp4 video files with similar quality level. | |
# This will be applied to all video files found under the directory passed | |
# as an argument to the script or the current working directory otherwise. | |
# The script will also check if the ffmpeg binaries are present and located | |
# in unrestricted directory. It will also check for the presence of fonts | |
# configuration file and copy it to the right place if they are absent. | |
# | |
# This code is free software: you can redistribute it and/or modify it under | |
# the terms of the GNU Lesser General Public License as published by the Free |