Skip to content

Instantly share code, notes, and snippets.

@jpantuso
jpantuso / README.md
Created June 17, 2011 18:18 — forked from jondkinney/README.md
Deploying Rails to Linode

Deploying Rails to Linode

Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.

Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.

Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.

Initial setup

@carldanley
carldanley / dom-ready.js
Created September 5, 2012 16:35
Simple DOM ready() detection without jQuery
var DOM = new function(){
var IS_READY = false;
var CALLBACKS = [];
var SELF = this;
SELF.ready = function( callback ){
//check to see if we're already finished
if( IS_READY === true && typeof callback === 'function' ){
callback();
return;
@lanceliao
lanceliao / openshift-nginx-compile.sh
Last active October 3, 2015 06:18
Compile and install nginx for OpenShift with memory cache, webdav and fancyindex support
#!/bin/sh
#
# Compile and install nginx for OpenShift
# with memory cache, webdav and fancyindex support
#
# This is a universal script which can run on any type of OpenShift gears
# Note:
# install dir: $OPENSHIFT_DATA_DIR
# tmp dir: $OPENSHIFT_TMP_DIR
# log dir: $OPENSHIFT_LOG_DIR
@tvvocold
tvvocold / slides.fdzh.org - 在云端的泡泡糖
Last active May 5, 2017 15:49
slides.fdzh.org-请自定义文件名
<section data-background-transition='zoom' data-transition='concave' data-background='http://fdorg.qiniudn.com/galaxy-10996_1280.jpg' data-state='blackout'>
<h1>在云端的泡泡糖</h1>
<h4>slides.fdzh.org</h4>
<p>请按 空格 或点击 右下角方向键 继续演示...</p>
</section>
<section data-background-transition='zoom' data-transition='linear'>
<h2>如何使用?</h2>
<p>仅需 Fork 一份 Gist </p>
<a href='https://gist.github.com/tvvocold/30e2848f2ba2a294ab28'>https://gist.github.com/tvvocold/30e2848f2ba2a294ab28</a></p>
@imjasonh
imjasonh / markdown.css
Last active November 6, 2024 14:26
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@koreno
koreno / README.md
Last active April 1, 2020 10:44
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.

Prebase

git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.

  • Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
  • Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).

Installation

Add the executable to your path and git will automatically expose it as

@nicolabricot
nicolabricot / deployment_key.sh
Last active June 19, 2024 03:06
Creation of Git deployment key for user www-data on Debian
# let's be root
su
# go the apache folder
cd /var/www
# create folder to store keys
mkdir .ssh
chown -R www-data:www-data .ssh
# create keys
@BenSampo
BenSampo / deploy.sh
Last active November 13, 2024 14:47
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH