Different services I can suggest when a non-tech friend or family member asks me how they can cheaply make a website and possibly use it to sell stuff online.
Website Hosting
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
# minimal rails3 app | |
require 'action_controller' | |
Router = ActionDispatch::Routing::RouteSet.new | |
Router.draw do | |
root :to => 'site#index' | |
end | |
class SiteController < ActionController::Metal |
var fs = require('fs'); | |
var child_process = require('child_process'); | |
var spawn = child_process.spawn; | |
function openEditor(file) { | |
var cp = spawn(process.env.EDITOR, [file], { | |
customFds: [ | |
process.stdin, | |
process.stdout, | |
process.stderr |
# vmc update is great for test and development, however it stops your old app and stages and starts the new one, | |
# resulting in dropped requests. | |
# If you want to update an application without dropping user requests, see below. | |
# NOTE: This change assumes your application can share services, etc with the new version. | |
# Assume my app is named foo | |
vmc push foo-v2 --url foov2.cloudfoundry.com |
Different services I can suggest when a non-tech friend or family member asks me how they can cheaply make a website and possibly use it to sell stuff online.
Website Hosting
# Usage: | |
# $loopc echo 'hello world' | |
# hello world | |
# hello world | |
# hello world | |
# hello world | |
# hello world | |
# | |
#(i.e. defaults to 5 iterations) |
######################################################################## | |
### Rakefile for encrypted passwords | |
######################################################################## | |
# | |
# Here's a little Rakefile to manage your encrypted password file! It's | |
# really easy to use: | |
# | |
# 1) put the email addresses of the keys you want in AUTHORIZED_USERS | |
# 2) create a passwords.txt (and ignore it in your SCM) | |
# 3) run `rake passwords:encrypt` |
http://about.digg.com/blog/master-puppets-2-speaking-language | |
http://agiletesting.blogspot.com/2009/11/automated-deployments-with-puppet-and.html | |
http://articles.itecsoftware.com/linux/install-and-configure-puppet-client-on-ubuntu-10-10 | |
http://articles.itecsoftware.com/linux/install-and-configure-puppet-server-puppetmaster-on-ubuntu-10-10 | |
http://bitfieldconsulting.com/puppet-and-mysql-create-databases-and-users | |
http://blog.credativ.com/en/2010/03/howto-introduction-to-puppet.html | |
http://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/ | |
http://en.gentoo-wiki.com/wiki/Puppet (the "User" portion) | |
http://evolvingweb.ca/story/controlling-your-cloud-puppet | |
http://library.linode.com/application-stacks/puppet/automation |
function escapeString(string) { | |
string = string.replace(/\\/g, "\\\\"). | |
replace(/\n/g, "\\n"). | |
replace(/\r/g, "\\r"). | |
replace(/\t/g, "\\t"); | |
if (string.indexOf("'") < 0) { | |
return "'" + string + "'"; | |
} | |
string = string.replace(/"/g, "\\\""); | |
return '"' + string + '"'; |