from gcrawler import GCrawler, Downloader | |
import unittest | |
import urllib2 | |
import logging | |
import traceback | |
from datetime import datetime | |
import re | |
logging.basicConfig(level=logging.DEBUG) |
import gevent | |
from gevent import monkey, queue | |
monkey.patch_all() | |
import urllib2 | |
from time import sleep | |
import traceback | |
import logging |
# Thomas Parslow http://almostobsolete.net | |
# Just a work in progress and adapted to what I need right now. | |
# It does uploads (via a file-like object that you write to) and | |
# I've started on downloads. Needs the development version of Boto from Github. | |
# | |
# Example: | |
# | |
# glacierconn = GlacierConnection(AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY) | |
# writer = GlacierWriter(glacierconn, GLACIER_VAULT) | |
# writer.write(somedata) |
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
var FFT = (function() { | |
"use strict"; | |
var FFT = function() { | |
initialize.apply(this, arguments); | |
}, $this = FFT.prototype; | |
var FFT_PARAMS = { | |
get: function(n) { | |
return FFT_PARAMS[n] || (function() { |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
require 'rubygems' | |
require 'right_aws' | |
aws_access_key_id = 'your-access-key' | |
aws_secret_access_key = 'your-secret-key' | |
target_bucket = 'your-source-bucket' | |
destination_bucket = 'your-destination-bucket' | |
s3 = RightAws::S3Interface.new(aws_access_key_id, aws_secret_access_key) |