I hereby claim:
- I am thesmith on github.
- I am thesmith (https://keybase.io/thesmith) on keybase.
- I have a public key ASAmhXM0sxqXWyWJ11LZA9eltyLwRYAj9jHRSY1i7udZFwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
ERROR: Error installing memcached: | |
ERROR: Failed to build gem native extension. | |
/Users/besmith/.rbenv/versions/1.9.3-p484/bin/ruby extconf.rb | |
extconf.rb:17: Use RbConfig instead of obsolete and deprecated Config. | |
Building libmemcached. | |
tar xzf libmemcached-0.32.tar.gz 2>&1 | |
Patching libmemcached source for mark-dead behavior. | |
patch -p1 -f < libmemcached.patch | |
patching file libmemcached-0.32/libmemcached/memcached_response.c |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2274799/hack.sh | sh | |
# |
var lookup = 'http://pressassociation.com/brands/1166'; | |
var i=0; | |
var container = db.content.findOne({lookup: lookup}); | |
print('container currently has '+container.contents.length+' items.'); | |
for (i=0; i<container.contents.length; i++) { | |
if (container.contents[i] != null && container.contents[i].specialization == 'film') { | |
print('removing episode at poisition '+i+': '+container.contents[i]._id+' - '+container.contents[i].title); | |
//eval('db.content.update({_id: container._id}, {$unset: {"contents.'+i+'": 1 }})'); |
var lookup = 'http://www.bbc.co.uk/programmes/p00fys8v'; | |
var i=0; | |
var c=0; | |
var containers = db.content.find({lookup: lookup}); | |
var found = null; | |
for (c=0; c<containers.length(); c++) { | |
var container = containers[c]; | |
print("Currently processing "+container._id); |
#! /bin/sh | |
cd `dirname "$0"` | |
USER=`whoami` | |
if [ $USER != 'jetty' ] | |
then | |
sudo -u jetty $0 $@ | |
exit $? |
var reg = new RegExp("^tmp"); | |
var names = db.getCollectionNames(); | |
for (var col in names) { var name = names[col]; if (name.match(reg)) { db[name].drop();} } |
Message msg = new MessageBuilder() | |
.withRecipientJids(jid) | |
.withBody(video.toString()) | |
.withMessageType(MessageType.CHAT).build(); | |
boolean messageSent = false; | |
if (xmpp.getPresence(jid).isAvailable()) { | |
SendResponse status = xmpp.sendMessage(msg); | |
messageSent = (status.getStatusMap().get(jid) == SendResponse.Status.SUCCESS); | |
} |
ContentQuery query = query() | |
.equalTo(Attributes.PLAYLIST_URI, "http://ref.atlasapi.org/hotness/twitter") | |
.equalTo(Attributes.ITEM_IS_LONG_FORM, true) | |
.build(); | |
List<Item> mentionedItems = client.items(query); |
<html> | |
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> | |
<script type="text/javascript"> | |
var addItem = function(item, i) { | |
var left = (i*200) % $("body").width(); | |
var top = Math.floor(Math.random() * 500); | |
$("<img/>").css({ position: 'absolute', left: left, top: top, opacity: 0, width: 100}).attr("src", item.thumbnail).appendTo("body").animate({ |