Skip to content

Instantly share code, notes, and snippets.

View codingisacopingstrategy's full-sized avatar

Eric Schrijver codingisacopingstrategy

View GitHub Profile
Uncensorme.xyz revolves around the problem of censorship, freedom of speech, and freedom of information.
Censorship has followed the free expressions of men and women like a shadow throughout history.
There have been book burnings by fascist regimes, religions prohibiting texts, and artists and activists sentenced to death.
These acts of censorship may seem like they are far away, but are actually closer than you might think.
The internet, unfortunately, is not quite open, and for a platform that is often described as the last bastion of free speech, there is an awful lot of censorship.
@codingisacopingstrategy
codingisacopingstrategy / getrevisions.sh
Created April 22, 2016 13:37
Make a movie from a graphviz saved to a public etherpad
#!/bin/bash
# cf http://mclear.co.uk/2012/10/16/etherpad-viewing-a-saved-revision/
i=1
echo "get revisions for url: $1"
while [ $? = 0 ]
do
curl "$1/$i/export/txt" > "`printf %04d $i`.dot"
i=$[$i+1]
done
Visual Culture a Tool for Design Collaboration
Visualisez l'évolution de vos projets de design, facilitez vos collaborations, exploitez la puissance de Git !
Suivre le projetAppli / GraphiqueBrussels, Belgium
Large_osp-1412333294 4
Tweet
Embed
Email
@codingisacopingstrategy
codingisacopingstrategy / prune_empty_pads.py
Created July 23, 2014 09:25
Delete all the pads on an Etherpad instance that have 0 revisions (they often appear when you type the wrong url by hand)
# -*- coding: utf-8 -*-
import sys
import json
import urllib
import urllib2
"""
Delete all the pads on an Etherpad instance that have 0 revisions (they often appear when you type the wrong url by hand)
"""
@codingisacopingstrategy
codingisacopingstrategy / tpi.py
Last active August 29, 2015 14:01
Creates mark-up for the images on http://i.liketightpants.net/and/
#!/usr/bin/env python
# Creates mark-up for the images on http://i.liketightpants.net/and/
import sys
from PIL import Image
picture = sys.argv[1]
try:
picture = int(picture)
@codingisacopingstrategy
codingisacopingstrategy / jpeg.sh
Created April 27, 2014 23:03
Convert raw to jpeg in os x shell
for f1 in *.*; do
sips -s format jpeg --resampleWidth 1024 "$f1" --out `echo $f1 | sed 's/\(.*\)\..*/\1/'`.jpg >/dev/null
# echo `echo $f1 | sed 's/\(.*\)\..*/\1/'`.jpg
done
echo "stop"
@codingisacopingstrategy
codingisacopingstrategy / scrape.js
Created April 9, 2014 12:49
Scrape a webpage, optionally giving just the HTML of the specified selector
/**
* Usage: phantomjs scrape.js URL [selector]
* selector defaults to `#content`
*/
var page = require('webpage').create(),
system = require('system');
if (system.args.length < 2 || system.args.length > 3) {
@codingisacopingstrategy
codingisacopingstrategy / django_auth_to_vcard.py
Created March 7, 2014 09:46
Export django users as vcards (to run in the django shell, requires vObject library)
import vobject
from django.contrib.auth.models import User
def vcard(user):
j = vobject.vCard()
o = j.add('fn')
o.value = user.get_full_name()
o = j.add('n')
o.value = vobject.vcard.Name( family=user.last_name, given=user.first_name )
j.add('email')
@codingisacopingstrategy
codingisacopingstrategy / gist:9249967
Created February 27, 2014 13:28
Interacting with the Funambol API
/* So I logged, opened up the console, and this worked.
*
* I did add jQuery with the jQuerify extension though
* Underscore is already loaded.
*
*/
var contacts;
$.ajax({
url: '/sapi/contact?action=get',
@codingisacopingstrategy
codingisacopingstrategy / gist:7791856
Created December 4, 2013 17:29
Example on http://popcornjs.org/popcorn-docs/addon-development/ with the hardcoded linenumbers removed. var nodes = document.querySelectorAll(".lineno"); for (var i=0; i < nodes.length; i++) { var node = nodes[i]; node.parentNode.removeChild(node) };
// Pattern 1
// Provide a function that returns an object
(function( Popcorn ) {
Popcorn.plugin( "pluginName" , function( options ) {
// do stuff
// this refers to the popcorn object
// You are required to return an object
// with a start and end property
return {