This file contains hidden or 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
#!/bin/bash -xe | |
# Run this script from machine with the credintials and the latest api tools installed | |
EBS_DEVICE='/dev/sdh' | |
INSTANCE_ID=$1 | |
AKI=${2:-'aki-5f15f636'} | |
ARI=${3:-'ari-0915f660'} | |
ARCH=${4:-'i386'} | |
SIZE=${5:-10} |
This file contains hidden or 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
<% form_tag :search, :url => asdf, :html => { :id => 'search_form' } do %> | |
<%= text_field_tag :search %> | |
<%= submit_tag 'zoeken' %> | |
<% end %> | |
<div id="search_results"></div> | |
$('#search_form').live('submit', function(event) { | |
event.preventDefault(); | |
$.post($(this).attr('action'), $(this).serialize(), null, 'script'); | |
}); |
This file contains hidden or 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
!!! 5 | |
%html | |
%head | |
%title= 'Zetetic - ' + yield_for(:title, 'Blog') | |
%meta{:name => 'description', :content => yield_for(:description, "blarf blarf dorf dorf dorf, hooray it's our blog!")}/ | |
... |
This file contains hidden or 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
!!! 5 | |
%html | |
%head | |
%title= 'Zetetic - ' + yield_for(:title, 'Blog') | |
%meta{:name => 'description', :content => yield_for(:description, "blarf blarf dorf dorf dorf, hooray it's our blog!")}/ | |
... |
This file contains hidden or 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
!!! 5 | |
%html | |
%head | |
%title= 'Zetetic - ' + yield_for(:title, 'Blog') | |
%meta{:name => 'description', :content => yield_for(:description, "blarf blarf dorf dorf dorf, hooray it's our blog!")}/ | |
... |
This file contains hidden or 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
%div{'data-role' => 'page'} | |
%div{'data-role' => 'header'} | |
%h1 InCult #{t('mobile.mobile').capitalize} | |
%div{'data-role' => 'content'} | |
%ul{'data-role' => 'listview', 'data-inset' => 'true', 'data-theme' => 'c', 'data-dividertheme' => 'b'} | |
%li{'data-role' => 'list-divider'} Menu | |
%li=link_to t('site.artists').capitalize, artists_url | |
%li=link_to t('mobile.current_events').capitalize, events_url | |
%li=link_to t('site.venues').capitalize, venues_url | |
= form_tag('/search', :id => 'qs') do |f| |
This file contains hidden or 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
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
$ tar xzvf ./nginx-0.8.52.tar.gz | |
$ rm ./nginx-0.8.52.tar.gz | |
$ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
$ passenger-install-nginx-module | |
# Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
# Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
# Where do you want to install Nginx to?: /opt/nginx |
This file contains hidden or 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
def self.order(ids) | |
# The postgresql way | |
update_all(["position = STRPOS(?, ','||id||',')", ",#{ids.join(',')},"], { :id => ids }) | |
# the mysql way | |
# update_all(['position = FIND_IN_SET(id, ?)', ids.join(',')],{ :id => ids }) | |
end |
This file contains hidden or 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
#vc | |
Loading player... | |
:javascript | |
jwplayer("vc").setup({ | |
flashplayer: "#{asset_path 'jwplayer/player.swf'}", | |
file: "#{@video.path}_site.mp4", | |
image: "http://#{APP_CONFIG['bucket_name']}.s3.amazonaws.com/#{@thumb}/site/frame_0004.png", | |
height: 375, | |
width: 700, | |
streamer: "rtmp://#{APP_CONFIG['cloudfront_url_video']}/cfx/st", |
This file contains hidden or 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
=f.select :country, ["Afghanistan", | |
"Albanië", | |
"Algerije", | |
"Amerikaanse Overzeese eilanden", | |
"Andorra", | |
"Angola", | |
"Anguilla", | |
"Antartica", | |
"Antigua", | |
"Argentinië", |
OlderNewer