IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available
)!
Remove old nginx incl. nginx-common:
apt-get autoremove --purge nginx nginx-common
module ActiveAdmin::ViewHelpers | |
include ApplicationHelper | |
def show_image(p) | |
p.object.image.nil? ? p.template.content_tag(:span, "No Upload Image Yet") : p.template.image_tag(p.object.image.url(:small)) | |
end | |
end | |
module ActiveAdmin | |
module Views | |
class Footer < Component |
# If you have OpenSSL installed, we recommend updating | |
# the following line to use "https" | |
source 'http://rubygems.org' | |
gem "middleman", "~>3.3.4" | |
# Live-reloading plugin | |
gem "middleman-livereload", "~> 3.1.0" | |
# For faster file watcher updates on Windows: |
/************************ | |
Designed by : http://responsivewebinc.com | |
************************/ | |
/* Font Size */ | |
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,400,700,600); | |
@import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700); | |
/* Basic CSS starts */ | |
body{ |
let prizesDictionary = prizes[0] as NSDictionary | |
let toPrizesArray = prizesDictionary["to_prizes"] as NSArray | |
self.items = toPrizesArray as [AnyObject] as [String] |
#How to Use rails _4.0.0_ new $1 -m app_tmpl.rb -T --skip-bundle | |
# rails (4.0.0, 3.2.13, 3.2.12) | |
require 'ap' | |
require 'awesome_print' | |
app_name=@app_name | |
remove_file "README.rdoc" | |
create_file "README.md", "TODO" | |
create_file ".ruby-version" |
MySQL | |
=============== | |
Getting started: | |
- http://www.sqlteaching.com/ | |
- https://www.codecademy.com/courses/learn-sql | |
Related tutorials: | |
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P | |
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics |
require 'timeout' | |
pid = fork do | |
puts "Forking ..." | |
sleep(10) | |
end | |
p "pid #{pid}" | |
begin | |
# Timeout.timeout(20) do |
http://stackoverflow.com/questions/930519/how-to-run-one-last-function-before-getting-killed-in-python | |
class StreamingVerificationsController < ApplicationController | |
# GET /streaming_verifications | |
# GET /streaming_verifications.json | |
include StreamingVerificationsHelper | |
def index | |
# @streaming_verifications = StreamingVerification.all | |
@streaming_verifications = StreamingVerification.task_done | |
check_status() |