Skip to content

Instantly share code, notes, and snippets.

@gagarine
gagarine / TP1.R
Last active October 31, 2016 18:16
##
# TP1
# Simon Perdrisat & Amantin Baruti- 2016
# Replication table 4b p 494 of "ECONOMIC AND POLITICAL EXPLANATIONS OF HUMAN RIGHTS VIOLATIONS" by NEIL J. MITCHELL and JAMES M. McCORMICK
#
# Note: I'm using = instead of <-
# http://blog.revolutionanalytics.com/2008/12/use-equals-or-arrow-for-assignment.html
#
##
import datetime
from django.db import models
from django.utils import timezone
from django.core.urlresolvers import reverse
# Create your models here.
class Asset(models.Model):
title_text = models.CharField(max_length=200)
@gagarine
gagarine / screen_color_flash.asm
Last active August 29, 2015 14:23
For comodor 64
processor 6502
org $1000
init_screen
lda #$00
sta $d020
sta $d021
lda #$20 ; #$20 is the spacebar Screen Code
clear
sta $0400,x ; fill four areas with 256 spacebar characters
@gagarine
gagarine / id_rsa.pub
Created June 4, 2014 16:32
Simon Perdrisat (gagarine) public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAu/cwbvj7V5hC6ofinO3e44CfqAMB14T850PTxpSz756eJGv0klkpf+CpI54ZfowNoWrmkcFe0mLwuKTsn03zsCgmI/YtV+91aaCjoM5+/6yMUflc/u42pEtHk48svf337K70LaSfN84yJuqPBzECYvPFU3ev0UHXEhGgyrNNfTeQd4pHu0K8AFTTNE2sRjf07F3cCsx/zOR5LNVyOO3zSakeESCWc20chNfLs7XdMBpU3WoM6OWRbUxPy6BhxSeDY3t9rI+YyWEcqbSv6v5IJLkQsndb4tfYcZWPDbMRTAxChDUrboZrpeyGkYOG7Qe/IQdHrlcNEsWolWLIVfeRtQ== perdrisat@gmail.com
From 43c894588777fa219440dea797a5460bb8e7e95a Mon Sep 17 00:00:00 2001
From: gagarine <simon@antistatique.net>
Date: Mon, 25 Feb 2013 15:25:32 +0100
Subject: [PATCH] make the export function works
---
wp/wp-content/plugins/surveys/export.php | 19 ++++++++++---------
wp/wp-content/plugins/surveys/export_choose.php | 2 +-
2 files changed, 11 insertions(+), 10 deletions(-)
@gagarine
gagarine / note.md
Last active December 12, 2015 08:39
Documentation store and annotate

Target

Storage

  • Store documents
  • Get the structure of plain text (title, chapter, paragraphe, sentence, line, word we want to turn in link) to a structured version (XML)
  • Store structured documents in a NoSQL database (or git?)

Annotations

  • Attach annotation in document

Version and history

@gagarine
gagarine / website-launch.md
Created January 17, 2013 08:34
checkliste

Test multi-platformes

  • IE
  • IOS
  • Android
  • Chrome
  • Firefox

Sécurité et performance

  • Désactivé les compte de test
@gagarine
gagarine / template.php
Created November 19, 2012 09:21
Two chars language name in drupal's language switcher
/**
* theme_link for local block.
*
* Get language code as language switcher link (two chars)
*
* @param type $variables
* @return type
*/
function THEME_links__locale_block($variables) {
foreach ($variables['links'] as $key => $value) {
@gagarine
gagarine / fabfile.py
Created November 13, 2012 09:05
drupal deployment
from __future__ import with_statement
from fabric.api import *
@task
def prod():
env.hosts = ['100.100.100.100']
env.user = ""
env.password = ""
@gagarine
gagarine / site.conf
Created August 3, 2012 13:25
drupal nginx and browser language detection
map $http_accept_language $lang {
default de;
~*fr fr;
~*it it;
}
server {
server_name _ site.com;
root /var/www/site.com/drupal;
client_max_body_size 10m;