I hereby claim:
- I am timmillwood on github.
- I am timmillwood (https://keybase.io/timmillwood) on keybase.
- I have a public key ASAI3wNnBXmeCRzcC3YoQ62_8xmYTqO9wciT2mbTwNvxRwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| echo "Starting Deploy..." | |
| echo "Check for the files directory, if not created - create it" | |
| if [ ! -d ${OPENSHIFT_DATA_DIR}sites/default/files ]; then | |
| mkdir -p ${OPENSHIFT_DATA_DIR}sites/default/files | |
| echo "Done creating files directory" | |
| else |
| <?php | |
| /** | |
| * Add pt translations | |
| */ | |
| function hook_update_7001() { | |
| $path = drupal_get_path('module', 'mymodule'); | |
| $poFile = $path . '/translations/pt-pt-mymodule-7.x-1.0.po'; | |
| $file = new stdClass; | |
| $file->uri = $poFile; |
| class ApplicationController < ActionController::Base | |
| rescue_from Exception do |exception| | |
| respond_to do |format| | |
| format.html { redirect_to '/', :alert => exception.message } | |
| format.js { render :js => "window.location.replace('/'); alert('#{html_escape(exception.message)}');" } | |
| end | |
| end | |
| end |
| @mixin body-background($width) { | |
| @media (max-width: #{$width}px) { | |
| $height: $width / 3.26853707; | |
| background-image: url('http://res.cloudinary.com/hghr6de3u/image/upload/c_scale,q_75,w_#{$width}/AbergavennyBackground_lldg0t.jpg'); | |
| #banner { | |
| height: #{$height}px; | |
| @if $width > 768 { | |
| padding-top: 5em; | |
| } | |
| @else { |
| require 'sinatra/base' | |
| require 'sinatra/assetpack' | |
| require 'sass' | |
| require 'bootstrap-sass' | |
| class App < Sinatra::Base | |
| path = File.expand_path(File.dirname(__FILE__)) | |
| set :root, '/' | |
| set :views, "#{path}/views" |
| #!/bin/bash | |
| dc_git="$1" | |
| mc_git="$2" | |
| git clone --mirror ${dc_git} dc | |
| cd dc | |
| git remote add mc ${mc_git} | |
| git push --mirror mc | |
| cd .. |
| # This is just an hint for a simple Redis caching "framework" using Sinatra | |
| # A friend of mine asked for something like that, after checking the first two gems realized there was | |
| # a lot of useless complexity (IMHO). That's the result. | |
| # | |
| # The use_cache parameter is useful if you want to cache only if the user is authenticated or | |
| # something like that, so you can do cache_url(ttl,User.logged_in?, ...) | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' |
| require 'sinatra' | |
| get '/hi' do | |
| "Hello World!" | |
| end |