Skip to content

Instantly share code, notes, and snippets.

View robraux's full-sized avatar

Rob robraux

  • Raux Software, LLC
  • Ann Arbor, MI
View GitHub Profile
@robraux
robraux / gist:2143639
Created March 21, 2012 02:00
Example of using Duplicity in Ubuntu
#1 Install it (example of linking to RackSpace Cloud), ubuntu example
apt-get install duplicity
apt-get install python-setuptools
git clone git://github.com/rackspace/python-cloudfiles.git
python setup.py install
#2 Create a simple shell script (put this in a shell script)
export CLOUDFILES_USERNAME=YOURNAME
export CLOUDFILES_APIKEY=YOURKEY
local res
local mover
-- step 1: ensure the target database is flushed
redis.call('select', ARGV[1])
redis.call('flushdb')
-- step 2: fetch keys to transfer from database 0, that is one and only master
redis.call('select', 0)
res = redis.call('keys', '*')
for key, value in pairs(res)
do
-- lua has no split string, so we need to write our own
-- explode(seperator, string)
local explode = function(d,p)
local t, ll, l
t={}
ll=0
if(#p == 1) then return {p} end
while true do
l=string.find(p,d,ll,true) -- find the next d in the string
if l~=nil then -- if "not not" found then..
[program:staging-api]
command=/usr/local/bin/node index.js
directory=/home/dreams/do/come/true
environment=NODE_ENV=production,USER=ubuntu,PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/game"
user=ubuntu
robr@atty:~/api git:(deployment) $ npm install nodetime
npm http GET https://registry.npmjs.org/nodetime
npm http 200 https://registry.npmjs.org/nodetime
npm http GET https://registry.npmjs.org/nodetime/-/nodetime-0.8.3.tgz
npm http 200 https://registry.npmjs.org/nodetime/-/nodetime-0.8.3.tgz
npm ERR! Error: EPERM, chown '/home/robr/.npm/nodetime/0.8.3/package.tgz'
npm ERR! { [Error: EPERM, chown '/home/robr/.npm/nodetime/0.8.3/package.tgz']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/home/robr/.npm/nodetime/0.8.3/package.tgz' }
@robraux
robraux / gist:6594832
Created September 17, 2013 14:11
All open CORS S3
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
[alias]
st = status
ci = commit
br = branch
brr = "!f(){ git push origin origin:refs/heads/$1 && git checkout --track -b $1 origin/$1; };f"
df = diff
lg = log
co = checkout
m = checkout master
{{? app.filters && app.filters.length > 0 }}
{{~app.filters :value:index2}}
.filter("{{=app.key}}{{=value.js_function_name}}", function() {
{{=value.content}}
})
{{~}}
{{?}}
{
"item": [
{
"value": 1320,
"label": "200"
},
{
"value": 8,
"label": "400"
},
*** -[__NSArrayI objectAtIndex:]: index 5 beyond bounds [0 .. 0]
(
"1 RunForth 0x0025e109 HandleUbertestersException + 64",
"2 CoreFoundation 0x2e5ee205 <redacted> + 580",
"3 libobjc.A.dylib 0x38d82f6b <redacted> + 174",
"4 libc++abi.dylib 0x3874d1b3 <redacted> + 78",
"5 libc++abi.dylib 0x3874cd17 __cxa_rethrow + 102",
"6 libobjc.A.dylib 0x38d82e2f objc_exception_rethrow + 42",
"7 CoreFoundation 0x2e52181f CFRunLoopRunSpecific + 642",
"8 CoreFoundation 0x2e52158b CFRunLoopRunInMode + 106",