Instructions to setup MySQL backup on a server and upload to Amazon S3 including email notification on backup failures. Refer to backup gem for more details
Install rbenv:
$ sudo apt-get update
$ sudo apt-get -y install curl git-core
Instructions to setup MySQL backup on a server and upload to Amazon S3 including email notification on backup failures. Refer to backup gem for more details
Install rbenv:
$ sudo apt-get update
$ sudo apt-get -y install curl git-core
| cookie = CGI.unescape("cookie here") | |
| secret_key_base = "secret key here" | |
| encrypted_cookie_salt = "encrypted cookie" | |
| encrypted_signed_cookie_salt = "signed encrypted cookie" | |
| key_generator = ActiveSupport::KeyGenerator.new(secret_key_base, iterations: 1000) | |
| secret = key_generator.generate_key(encrypted_cookie_salt) | |
| sign_secret = key_generator.generate_key(encrypted_signed_cookie_salt) |
| # encoding: utf-8 | |
| ## | |
| # Backup Generated: 8share_backup | |
| # Once configured, you can run the backup with the following command: | |
| # | |
| # $ backup perform -t backup [-c <path_to_configuration_file>] | |
| # | |
| # For more information about Backup's components, see the documentation at: | |
| # http://meskyanichi.github.io/backup |
| <iframe id="donation-iframe" data-src="http://unicef.my/donations/confirmed?iframe=true" width="700px" height="700px" seamless="true" border="0" style="margin: 0; padding: 0; border: none"></iframe> | |
| <script type="text/javascript"> | |
| window.onload = function() { | |
| var params = window.location.toString().split('?')[1], | |
| iframe = document.getElementById('donation-iframe'); | |
| iframe.src = iframe.getAttribute('data-src') + '&' + params; | |
| }; | |
| </script> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | |
| <title>Todo</title> | |
| <link rel="stylesheet" type="text/css" href="todo.css"> | |
| <script type="text/javascript"> | |
| window.addEventListener('load', run); | |
| function run() { |
| export DEBIAN_FRONTEND=noninteractive | |
| sudo apt-get update | |
| # Ruby dependencies | |
| sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison git-core libcurl4-openssl-dev | |
| # Imagemagick | |
| sudo apt-get -y install imagemagick |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| #!/bin/sh | |
| # Map LISTENing TCP ports to their PIDs using lsof | |
| LSOF=/usr/sbin/lsof | |
| # e.g. netstat -an | |
| # 127.0.0.1.25 *.* 0 0 49152 0 LISTEN | |
| # *.22 *.* 0 0 49152 0 LISTEN |
| class TwerkBot < RTanque::Bot::Brain | |
| NAME = 'twerk_bot' | |
| include RTanque::Bot::BrainHelper | |
| def tick! | |
| ## main logic goes here | |
| @tick_count ||= 0 | |
| @tick_count+=1 | |
| command.speed = MAX_BOT_SPEED if command.speed == nil | |
Install XCode from App Store or DVD.
Download https://s3-ap-southeast-1.amazonaws.com/says-misc/command_line_tools_for_xcode_4.5_os_x_mountain_lion.dmg and install