Skip to content

Instantly share code, notes, and snippets.

ale rimoldi aoloe

Block or report user

Report or block aoloe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aoloe
aoloe / CMakeLists.txt
Last active Mar 21, 2018
cycle and reverse for scribus
View CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
PROJECT(cycle-and-reverse)
SET(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
View gist:7bddc219214c4ca626b09006939299cf
#!/usr/bin/python3
import os
import sys
import datetime
import argparse
import yaml
import json
import subprocess
import tempfile
@aoloe
aoloe / composer.json
Created Nov 13, 2015
mustache with partials and associative arrays
View composer.json
{
"name": "aoloe/mustache-test",
"require" : {
"mustache/mustache" : "~2.5"
}
}
@aoloe
aoloe / labadoo-scratch.md
Last active Oct 5, 2015
game ideas for the labadoo scratch day
View labadoo-scratch.md

scratch cards for the labadoo day

on top of using

we could create sets of cards specific to the creation of a few games or make sure that a card exist for each step of the game.

  • pong
@aoloe
aoloe / webrtc-editor.md
Last active May 4, 2018
webrtc collaborative document editing
View webrtc-editor.md

specification:

  • php server storing a server.
  • the first person opening a file becomes the master and is in charge to save to the server
  • all other users open webrtc connection to the master and keep the document in sync with him
  • if it makes things easier, only allow one user at a time to edit a block (paragraph, list, section)

todo:

  • check if and how to get webrtc to work without a node server.
  • try to convert a chat example in a text editor.
@aoloe
aoloe / ex14_vector.cpp
Created Sep 22, 2015
exercise 19, chapter 4, programming c++
View ex14_vector.cpp
// type names and scores
#include "std_lib_facilities.h"
int main(){
vector<string> names;
vector<int> scores;
string name;
int score;
@aoloe
aoloe / 3columnA4.py
Created Sep 17, 2015
fixing scribus/scribus/plugins/scriptplugin/samples/3columnA4.py
View 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 / src-status.py
Created May 29, 2015
git status with dir from python
View src-status.py
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")) :
View toc.py
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))
View tomd.py
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
You can’t perform that action at this time.