Skip to content

Instantly share code, notes, and snippets.

View emanueleaina's full-sized avatar

Emanuele Aina emanueleaina

View GitHub Profile
#!/usr/bin/python
# git config annex.iwebftp-hook "/usr/local/bin/git-annex-ftp.py -s prefix.iweb-storage.com -u prefix-admin -p password"
# git annex initremote iwebftp type=hook hooktype=iwebftp encryption=none
from ftplib import FTP, error_perm
import os, argparse
parser = argparse.ArgumentParser(description='Combined hook for FTP remotes in git-annex')
parser.add_argument('-s', '--server', required=True, help='the FTP host name or IP address')
@emanueleaina
emanueleaina / clutter-framebuffer-projection.c
Created December 18, 2012 19:16
Experiment with setting an ortographic projection matrix on the framebuffer from a container Actor.
#define COGL_ENABLE_EXPERIMENTAL_API
#include <stdlib.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>
/* TrContainerActor *
********************/
typedef struct _TrContainerActor TrContainerActor;
@emanueleaina
emanueleaina / clutter-pivot-rotate.c
Created December 14, 2012 13:44
Experiment with different techniques to rotate an Actor around a pivot point with the Clutter toolkit.
#include <stdlib.h>
#include <clutter/clutter.h>
static gboolean
on_key_press (ClutterActor *stage G_GNUC_UNUSED,
ClutterEvent *event,
gpointer data)
{
guint key_symbol;
ClutterActor *rect = CLUTTER_ACTOR (data);