Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍
🔥⌛️(⧖)

Xavier Damman xdamman

🌍
🔥⌛️(⧖)
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am xdamman on github.
  • I am xdamman (https://keybase.io/xdamman) on keybase.
  • I have a public key whose fingerprint is 44A7 D05F F1F6 D0B8 0F79 15A6 1426 1B13 FD43 0CDC

To claim this, I am signing this object:

View gist:e3387e1adf51aeb021d0

Compile avconv on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the Filtering Guide).

Note: Copy and paste the whole code box

View snippet.sh
# Add this to your ~/.bash_profile
# Now you can just type in terminal storifydev
# It will start mongod, redis-server, chdir to your working dir, open textmate, and launch Chrome
function storifydev() {
STORIFY_DIR="/Users/xdamman/Dropbox/github/storify"
sudo rm /data/db/mongod.lock
echo "Starting MongoDB"
sudo mongod > /dev/null &
echo "Starting Redis"
redis-server> /dev/null &
View snippet.txt
## Frontend developer (HTML5/CSS3)
### About us
Storify helps its users tell stories with social media.
* We launched our private beta as a finalist at TechCrunch Disrupt in September 2010, and won the Startup Accelerator at South by Southwest in 2011.
* Our users include the top sites on the Web: [The New York Times](), Mashable, [The Washington Post](http://storify.com/washingtonpost), Los Angeles Times, [ReadWriteWeb](http://storify.com/rww), [Al Jazeera](http://storify.com/ajstream) and many others worldwide, along with top brands like Levi’s and Samsung.
* We’re based in San Francisco in a newly remodeled loft office in the heart of the city.
* We’re a small team and the initial employees will play a key role in shaping the product and company culture.
* We use cutting edge technologies including node.js and MongoDB.
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
View snippet.txt
;(function() {
Slideshow = function() {
var self = this,
slides = [],
container = $('#elements'),
currentSlide=0,
totalSlides=0,
storify = new Storify(),
@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 / 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 / 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 / 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