Skip to content

Instantly share code, notes, and snippets.

View colindensem's full-sized avatar
🏠
Working from home

Fynn.Codes colindensem

🏠
Working from home
View GitHub Profile
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@colindensem
colindensem / gist:83da31e8eb01c685eebb
Created October 28, 2014 09:20
Rails4 Cap3 on Ubuntu with Unicorn & rbenv
#Random notes, rough sequence... use a paas.
#Percona mysql install
#http://www.percona.com/doc/percona-server/5.5/installation.html?id=percona-server:installation:from-repositories
#Create user
adduser deploy
passwd -l deploy
#Set ssh key
@colindensem
colindensem / Gruntfile.coffee
Last active August 29, 2015 14:08
Ember - Grunt - Build - S3 - Redis - Rails Serve
module.exports = (grunt) ->
timestamp = Date.now().toString
gitSha ='<%= gitinfo.local.branch.current.shortSHA %>'
grunt.initConfig
env: grunt.file.readJSON '.env.json'
replace:
prod:
src: ['dist/*.html']
@colindensem
colindensem / Makefile
Last active August 29, 2015 14:21 — forked from h4cc/Makefile
#
# Ubuntu 14.04 LTS (Trusty Tahr)
#
# Basic packages i usually install
#
# Author: Julius Beckmann <github@h4cc.de>
#
.PHONY: all preparations update upgrade graphics darktable networking google_chrome dropbox archives media pandoc system harddisk docker ansible filesystem apache2 php mysql memcached mongodb tools encfs_manager nautilus httpie erlang elixir openoffice owncloud x230_fingerprint couchdb google-cloud-print-install google-cloud-print-setup
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/subversion/bin/:$PATH"
# command prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;36m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
# Runs `git push` before `cap deploy`
# Otherwise just passes through to `cap`
function cap {
CAP="`which cap`"
if [[ "$1" == "deploy" || "$2" == "deploy" ]]; then
git push && $CAP $*
else
$CAP $*
fi
}
rescue ActiveRecord::StatementInvalid => e
puts "*"*10
puts "Error message: #{e}"
puts "*"*10
# Application
class App < Sinatra::Base
set :hi, "Hello"
configure :test do
set :hi, "Hello There!"
end
end
# Registering a extention
Rails CMS alternatives
======================
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
"the cutting edge Rails CMS platform"

Installing MongoDB on Debian (Ubuntu 9.10 Karmic Koala) – From Scratch!

$ sudo apt-get -y install tcsh git-core scons g++
$ sudo apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9.1-dev
$ curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ tar zxvf js-1.7.0.tar.gz
$ cd js/src
$ export CFLAGS=“-DJS_C_STRINGS_ARE_UTF8”
$ sudo make -f Makefile.ref
$ sudo JS_DIST=/usr make -f Makefile.ref export