Skip to content

Instantly share code, notes, and snippets.

View program247365's full-sized avatar
💭
YOLO 💯

Kevin Ridgway program247365

💭
YOLO 💯
View GitHub Profile

Media Temple Capistrano Deployment Recipe

With GitHub

See comments in the files for explanation. This works flawlessly for me on MediaTemple + Git(Hub).

NOTE: this assumes that the application name on the grid container and the application name in GitHub are the same.

To use:

On the Server

# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
# If it doesn't work, make sure your ~/.netrc is right
#
# (Thanks to @anildigital for curl-fu)
function tweet {
curl -n -d status="$*" http://twitter.com/statuses/update.xml &> /dev/null
echo "tweet'd"
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;
namespace ActiveDirectoryAccountLockOut
{
class Program

Poor Man's Deploy

  • Start a Sinatra server on port 4000
  • GET / to that server triggers a git pull and mod_rails restart
  • Hit port 4000 locally after pushing

Why?

using terms from application "Quicksilver"
on process text log_text
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'")
set theText to log_text
set theText to theDate & " " & theText & "
"
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string
set theFilePath to POSIX file thePosixFilePath
set theFileReference to open for access theFilePath with write permission
write theText to theFileReference starting at eof
using terms from application "Quicksilver"
on process text log_text
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'")
set theText to log_text
set theText to theDate & " " & theText & "
"
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string
set theFilePath to POSIX file thePosixFilePath
set theFileReference to open for access theFilePath with write permission
write theText to theFileReference starting at eof
#!/usr/bin/env ruby
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = ARGV[0].strip.downcase.gsub(/ /, '-')
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile"