Skip to content

Instantly share code, notes, and snippets.

@aoloe
aoloe / README.md
Last active August 29, 2015 14:03
issues attachments

This gist repository contains attachments for my issue tracker.

Just add files to this repository and then link them in the issue.

@aoloe
aoloe / main.qml
Created August 14, 2014 08:11
pyqt and qqmlapplicationengine
$ python3 test.py
QQmlApplicationEngine failed to load component
file:///home/ale/docs/src/scribus-script-repository/script-download/test/main.qml:4 AppplicationWindow is not a type
1 Sortir du nucléaire accueil
2 Journal actualite/journal
3 Agenda association/agenda
4 Presse accueil
5 Sortons du nucléaire accueil
6 Association accueil
7 Contact association/contact
8 Buts association/buts
9 Statuts association/statuts
14 Communiqués de presse actualite/communiques
import html2text
import csv
import unicodedata
#from unidecode import unidecode
#print unidecode(u"\u5317\u4EB0")
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
h = html2text.HTML2Text()
# Ignore converting links from HTML
import glob
import re
import csv
toc = []
p_id = re.compile('index.php\?id=(\d+)')
p_title = re.compile('<title>(.*) \| (.*)</title>')
for filename in glob.glob('index.php?id*'):
print(filename)
m = p_id.match(filename)
print(m.group(1))
@aoloe
aoloe / src-status.py
Created May 29, 2015 14:06
git status with dir from python
import os
from sh import git
def subDirPath (d):
return filter(os.path.isdir, [os.path.join(d,f) for f in os.listdir(d)])
curDir = os.getcwd()
curDir = "/home/ale/docs/src/"
for d in subDirPath(curDir) :
if os.path.isdir(os.path.join(d, ".git")) :
@aoloe
aoloe / 3columnA4.py
Created September 17, 2015 09:34
fixing scribus/scribus/plugins/scriptplugin/samples/3columnA4.py
# -*- coding: utf-8 -*-
"""
Creates 3 column layout on A4 paper and save it under 3columnA4.sla filename.
This is a simple way to demonstrate creating a doc on the fly.
"""
try:
# Please do not use 'from scribus import *' . If you must use a 'from import',
# Do so _after_ the 'import scribus' and only import the names you need, such
@aoloe
aoloe / ex14_vector.cpp
Created September 22, 2015 20:32
exercise 19, chapter 4, programming c++
// type names and scores
#include "std_lib_facilities.h"
int main(){
vector<string> names;
vector<int> scores;
string name;
int score;
@aoloe
aoloe / WP-event-manager-notes.php
Created July 16, 2012 19:20 — forked from ms-studio/WP-event-manager-notes.php
Notes regarding the WP event manager
<?php
/*
Target:
*******
Perfect solution for a simple WP event manager
Needs:
******
@aoloe
aoloe / composer.json
Created November 13, 2015 14:47
mustache with partials and associative arrays
{
"name": "aoloe/mustache-test",
"require" : {
"mustache/mustache" : "~2.5"
}
}