This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import getopt | |
import os, boto, shutil, subprocess, random, datetime | |
import os.path | |
from boto.s3.key import Key | |
from boto.s3.connection import Location | |
aws_key = 'your key' | |
aws_secret_key = 'your secret' | |
default_bucket = 'testing_0001' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show all the buckets | |
python s3_backup.py lb | |
# list bucket content | |
python s3_backup.py l bucketname | |
# upload file to bucket | |
python s3_backup.py u bucketname filename | |
# download file from bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:var%20Bitly={url:'<?php the_permalink() ?>'},e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.js');document.body.appendChild(e);void(0);">Bit.ly this!</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Michael van Rooijen | |
# Description: | |
# A Rails Stack Installer for Ubuntu 8.04/9.04 with the light-weight and fast NginX Web Server. | |
# This shell script will install a basic Rails Stack with a bunch of useful and commonly used utilities. | |
# It will install Ruby Enterprise Edition with Phusion Passenger (Reduces Rails Application Memory Usage By Approx. 33%) | |
# It will install some essential gems like mysql, sqlite, postgres etc. | |
# It will install NginX Web Server | |
# It will install the MySQL database | |
# It will install Git | |
# It will install these utilities: ImageMagick, FFMpeg, Memcached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------ | |
# Desigining "trending topics in 24 hours sliding window" with Redis | |
# ------------------------------------------------------------------ | |
redis-cli del tophashes:2010-12-07-08-00 | |
redis-cli del tophashes:2010-12-07-09-00 | |
redis-cli del tophashes:current | |
echo '=== 8:00 AM ===' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import shutil | |
import sys | |
import os | |
import subprocess | |
ROOT_PATH = "GGEngine/" | |
SRC_PATH = "src/gengine" | |
GG_USERNAME = "username" | |
GIT_REPO_URL = "ssh://" + GG_USERNAME + "@gandogames.com/path/to/engine.git " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fire = class() | |
-- Towers versus Zombies by @juaxix | |
-- LGPL - 11/2011 | |
-- http://videojuegos.ser3d.es | |
-- it is a pleasure to gift this to the world | |
-- thanks from heart to all the 2lifesleft team | |
function Fire:init(attackpower,position,model) | |
self.attackpower = attackpower | |
self.position = position | |
self.parent = model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% [:notice, :error, :alert].each do |level| %> | |
<% unless flash[level].blank? %> | |
<div class="alert-message <%= flash_class(level) %>"> | |
<a class="close" href="#">×</a> | |
<%= content_tag :p, flash[level] %> | |
</div> | |
<% end %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` | |
# Be sure to have rails and thin installed. | |
require "rubygems" | |
# We are not loading Active Record, nor the Assets Pipeline, etc. | |
# This could also be in your Gemfile. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
# The following lines should come as no surprise. Except by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A proof of concept monkeypatch to make Cloud9 IDE work on a tablet. | |
* Since i'm an extremely lazy bastard I prepended this snippet directly in package/client/js/apf_release.js | |
* | |
* What does it do? | |
* - It fires a doubleclick for a 2-finger tap | |
* - It fires a mousewheel up / down event for a 2-finger swipe up / down. | |
* | |
* How does it work? | |
* Prepend the functions below to <cloud9>/package/client/js/apf_release.js, save, load in tablet. |
OlderNewer