Skip to content

Instantly share code, notes, and snippets.

View julien51's full-sized avatar

Julien Genestoux julien51

View GitHub Profile
<iq type="set" from="[email protected]" to="firehoser.superfeedr.com" id="sub1">
<pubsub xmlns="http://jabber.org/protocol/pubsub" xmlns:superfeedr="http://superfeedr.com/xmpp-pubsub-ext">
<subscribe node="http://superfeedr.com/track?include=superfeedr" jid="[email protected]"/>
</pubsub>
</iq>
<iframe style="display:none;" src='https://www.subtome.com/register-no-ui.html?name=<Name of your application>&url=<url of the subscription handler>' />
<input type="button" onclick="(function(btn){var z=document.createElement('script');document.subtomeBtn=btn;z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})(this)" value="Subscribe">
@julien51
julien51 / rss-to-tumblr.lua
Created December 5, 2012 21:16
An example of how to post content to a Tumblr blog with Lua. Usable in Webscript.io
local tumblrName = "" -- Name of the Tumblr blog where the content will be posted
-- Extrat the data from the JSON notification and prepare it to be used as a Tumblr 'quote'.
local jsonContent = json.parse(request.body)
local quote = jsonContent.items[1].title
local sourceTitle = jsonContent.title
local sourceLink = jsonContent.standardLinks.self[1].href
-- Authenication against the Tumblr API. You will need to create an application and grab the OAuth access token.
@julien51
julien51 / get-oauth-key.py
Created December 5, 2012 21:15
A small script to grab the OAuth Info from Tumblr for a given app.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'

Tweeting on behalf of users is bad

I just got trapped by Prismatic who tweeted a metric ton of messages on my twitter account. I do not want to pick on Prismatic who is probably a great product otherwise. However this is clearly a pattern that we've all seen too many times and this has to stop.

Before anything else, I could have very well done a mistake and hit the wrong buttons/settings. I am not putting the blame on Prismatic, but on this crazy system that allows machines to post on my behalf. No matter what, though, they should obviously prevent me from doing something that dumb, if that's my fault.

What happened

You should see most of our requests from theses guys (used for fetching and parsing):
superparsr21 173.255.194.171
superparsr22 173.255.194.52
superparsr23 173.255.194.53
superparsr24 173.255.194.65
superparsr25 173.255.194.66
superparsr26 173.255.194.67
superparsr27 173.255.195.112
superparsr28 173.255.195.113
require('nodetime').profile({stdout: true});
// It is important to use named constructors (like the one below), otherwise
// the heap snapshots will not produce useful outputs for you.
function LeakingClass() {
}
var leaks = [];
setInterval(function() {
================================================================================
Error executing action `install` on resource 'python_pip[virtualenv]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of pip freeze | grep -i '^virtualenv==' ----
STDOUT:
STDERR:
20 times 60 feeds.
1.9.2
3.500000 0.180000 3.680000 3.805192
3.530000 0.180000 3.710000 3.790724
3.460000 0.170000 3.630000 3.715879
3.470000 0.180000 3.650000 3.708632
3.460000 0.180000 3.640000 3.680093
3.460000 0.170000 3.630000 3.675401
3.470000 0.180000 3.650000 3.674723