Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍
🔥⌛️(⧖)

Xavier Damman xdamman

🌍
🔥⌛️(⧖)
View GitHub Profile
View top years
235898,1980
32649,2003
297,1987
292,1985
288,1988
287,1981
285,1963
280,1984
276,1983
274,1982
View top domains
363202,HOTMAIL.COM
187090,GMAIL.COM
99806,SKYNET.BE
60011,TELENET.BE
59293,YAHOO.COM
56286,YAHOO.FR
22528,HOTMAIL.FR
17766,PANDORA.BE
12912,MSN.COM
11061,SCARLET.BE
@xdamman
xdamman / Accept all friends requests.js
Created Dec 21, 2012
Facebook friend requests zero I had 236 pending friends requests, so I decided to accept them all as a gesture before the end of the world. I wasn't ready to click on them all so just made that quick script you can run in the console when you are on the page https://www.facebook.com/friends/requests/
View Accept all friends requests.js
var a = document.getElementsByTagName('input');
for(var i=0;i<a.length;i++) if(a[i].getAttribute('value')=='Confirm') a[i].click();
@xdamman
xdamman / upgradeNode.js
Created Dec 19, 2012
Upgrade the default Joyent Smart Machine Node Image 1.3.3 to using node 0.8.16 (I don't like the newest 1.4.0 image since it doesn't come with out-of-the box push to a git repo and deploy)
View upgradeNode.js
#!/usr/bin/env bash
pkgin -f update
pkgin install gcc-compiler
mkdir src
cd src
curl -O http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
gtar -xpf node-v0.8.16.tar.gz
cd node-v0.8.16
./configure --with-dtrace --prefix=/opt/nodejs/v0.8.16/
gmake install
@xdamman
xdamman / zemanta source
Created Jul 10, 2012
Storify source example Zemanta
View zemanta source
{
"_id": {
"$oid": "4e49f6a1b756ba595aae31e5"
},
"name": "zemanta",
"label": "Zemanta",
"icon": "http://zemanta.com/favicon.ico",
"href": "http://zemanta.com",
"status": "",
"defaults": {
@xdamman
xdamman / gist:2174106
Created Mar 23, 2012
Creating a story with tweets with the Storify API
View gist:2174106

Get the user token

$ curl -d 'username=apitest&password=test&api_key=4f63d1315d82b3cfd351917e' https://api.storify.com/v1/auth

Response

{"content":{"username":"apitest","_access":0,"bio":null,"location":null,"website":"http://storify.com/apitest","avatar":"http://storify.com/public/img/default.avatar.png","permalink":"http://storify.com/apitest","settings":{"comments":null,"facebook_autoshare":true,"sxsw":false,"notifications":{"newsletter":true,"digest":true,"likes":true,"comments":true,"follower":true,"autoshare":true}},"stats":{"stories":11,"views":0,"embeds":0,"subscriptions":1,"subscribers":0},"date":{"updated":"2012-03-23T19:25:34.255Z","last_seen":"2012-03-23T19:25:34.254Z","featured":null,"created":"2012-03-17T00:17:36.951Z"},"subscribers":[],"subscriptions":[{"username":"storify","_access":1,"name":"Storify","bio":"Making stories from the social Web, finding moments to remember in the real-time stream. Co-founded by @burtherman and @xdamman","location":"Global","website":"http://storif
@xdamman
xdamman / gist:2129345
Created Mar 20, 2012
Create a story with tweets using the Storify API
View gist:2129345

Get the user token

$ curl -d 'username=apitest&password=test&api_key=4f67d405d06efbdac993a3cf' https://api.storify.com/v1/auth

Response

{"content":{"username":"apitest","_access":0,"bio":null,"location":null,"website":"http://storify.com/apitest","avatar":"http://storify.com/public/img/default.avatar.png","permalink":"http://storify.com/apitest","settings":{"comments":null,"facebook_autoshare":true,"sxsw":false,"notifications":{"newsletter":true,"digest":true,"likes":true,"comments":true,"follower":true,"autoshare":true}},"stats":{"stories":4,"views":0,"embeds":0,"subscriptions":1,"subscribers":0},"date":{"updated":"2012-03-17T01:23:53.504Z","last_seen":"2012-03-17T01:23:53.503Z","featured":null,"created":"2012-03-17T00:17:36.951Z"},"subscribers":[],"subscriptions":[{"username":"storify","_access":1,"name":"Storify","bio":"Making stories from the social Web, finding moments to remember in the real-time stream. Co-founded by @burtherman and @xdamman","location":"Global","website":"http://storify
@xdamman
xdamman / tweetbot-storify.md
Created Mar 17, 2012
Creating a story with tweets using the Storify API
View tweetbot-storify.md

Get the user token

$ curl -d 'username=apitest&password=test&api_key=4f63e62da2cbc21091d62d60' https://api.storify.com/v1/auth

Response

{"content":{"username":"apitest","_access":0,"bio":null,"location":null,"website":"http://storify.com/apitest","avatar":"http://storify.com/public/img/default.avatar.png","permalink":"http://storify.com/apitest","settings":{"comments":null,"facebook_autoshare":true,"sxsw":false,"notifications":{"newsletter":true,"digest":true,"likes":true,"comments":true,"follower":true,"autoshare":true}},"stats":{"stories":4,"views":0,"embeds":0,"subscriptions":1,"subscribers":0},"date":{"updated":"2012-03-17T01:23:53.504Z","last_seen":"2012-03-17T01:23:53.503Z","featured":null,"created":"2012-03-17T00:17:36.951Z"},"subscribers":[],"subscriptions":[{"username":"storify","_access":1,"name":"Storify","bio":"Making stories from the social Web, finding moments to remember in the real-time stream. Co-founded by @burtherman and @xdamman","location":"Global","website":"http://storify
View snippet.txt
;(function() {
Slideshow = function() {
var self = this,
slides = [],
container = $('#elements'),
currentSlide=0,
totalSlides=0,
storify = new Storify(),
View file.txt
Thu Aug 11 12:05:02 [initandlisten] connection accepted from 173.255.192.81:47206 #239877
Thu Aug 11 12:05:02 [conn239877] update storify.stories query: { permalink: "http://storify.com/thebhf/london-to-brighton-bike-ride-2011" } nscanned:1
2 key updates 152ms
Thu Aug 11 12:05:02 [conn239877] end connection 173.255.192.81:47206
Thu Aug 11 12:05:17 [replslave] repl: sleep 20sec before next pass
Thu Aug 11 12:05:37 [replslave] repl: sleep 20sec before next pass
Thu Aug 11 12:05:40 [conn239856] update storify.stories query: { _id: ObjectId('4e4411b918d7b6652b0384fd') } nscanned:1 moved 399ms
Thu Aug 11 12:05:57 [replslave] repl: sleep 20sec before next pass
Thu Aug 11 12:06:17 [replslave] repl: sleep 20sec before next pass
Thu Aug 11 12:06:37 [replslave] repl: sleep 20sec before next pass