Skip to content

Instantly share code, notes, and snippets.

@mrrooijen
mrrooijen / Capistrano-Deployment-Recipe.rb
Created July 29, 2009 09:34
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account [email protected]
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts
127.0.0.1 localhost.local
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server.
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0)
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@fajrif
fajrif / rvm_cheatsheet
Created June 14, 2011 14:11
RVM cheatsheet
RVM home page: http://rvm.beginrescueend.com
Install RVM
------------
See http://rvm.beginrescueend.com/rvm/install/
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Install rvm for all users
@jherrm
jherrm / gist:1054913
Created June 29, 2011 20:47 — forked from IPrism/gist:1010289
startup script for unicorn with rvm global installation
#!/bin/bash
### BEGIN INIT INFO
# Provides: APPLICATION
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the APPLICATION unicorns at boot
# Description: Enable APPLICATION at boot time.
### END INIT INFO
@boriscy
boriscy / install-ruby-debug-ubuntu-ruby-1.9.3
Created November 1, 2011 18:57
ruby-debug in ruby-1.9.3 and ubuntu
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883
linecache19-0.5.13.gem
ruby_core_source-0.1.5.gem
ruby-debug19-0.11.6.gem
ruby-debug-base19-0.11.26.gem
#Then in your console
export RVM_SRC=/your/path/to/ruby-1.9.3
@benmanns
benmanns / config-s3.yml
Created December 7, 2011 20:15
rake task to migrate paperclip attachments to Amazon S3
# Required:
access_key_id:
secret_access_key:
bucket_name:
# Optional:
server: s3.amazonaws.com
port: 80
use_ssl: false
persistent: false
@alexshk
alexshk / layout.haml
Created March 5, 2012 07:41
boilerplate haml layout
!!! 5
/[if lt IE 7] <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7">
/[if IE 7 ] <html lang="en" class="no-js lt-ie9 lt-ie8">
/[if IE 8 ] <html lang="en" class="no-js lt-ie9">
<!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
%head
%meta(charset="utf-8")
%meta(http-equiv="X-UA-Compatible" content="IE=edge,chrome=1")
%title
%meta(name="description" content="")
anonymous
anonymous / gist:2996643
Created June 26, 2012 15:55
Front-end programmer positions
We're a Chinese company building an enterprise collaboration product. Our founding team includes Chinese, Spanish and American entrepreneurs with more than 15 years of experience in China, managing more than 500 people and a track record of several successful exits.
We're headquartered in Shanghai, with offices in Beijing, Hong Kong, Singapore and Taiwan.
We're on stealth mode, with a fully-built first version of our product, and some big names as paying clients.
We are looking for 2 front-end programmers to give us a hand with our web and mobile apps.
These are the technologies that we use:
@osipov
osipov / gist:c2a34884a647c29765ed
Created July 21, 2014 19:12
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt