Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoît Rouits be1

View GitHub Profile
@be1
be1 / brasero2tex.go
Last active May 16, 2021
Quick (go version) program to generate a LaTeX cdcover from an xml Brasero project.
View brasero2tex.go
package main
import (
"os"
"time"
"strings"
"fmt"
"io/ioutil"
"encoding/xml"
"net/url"
@be1
be1 / brasero2tex.rs
Last active Apr 4, 2021
Quick (Rust version) LaTeX cd-cover generator from a brasero xml project.
View brasero2tex.rs
use serde_derive::Deserialize;
use structopt::StructOpt;
use serde_xml_rs::from_str;
use percent_encoding::percent_decode_str;
use chrono::Local;
#[derive(StructOpt)]
struct Cli {
/// The path to the file to read
#[structopt(parse(from_os_str))]
@be1
be1 / brasero2Tex.py
Last active Dec 1, 2020
Quick script to generate a LaTeX 'cd-cover' sheet from a Brasero project file, for music compilations.
View brasero2Tex.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, re, datetime, urllib.parse, xml.etree.ElementTree as ET
if len(sys.argv) < 2:
sys.exit('Usage: %s brasero.project.file' % sys.argv[0])
tree = ET.ElementTree(file=sys.argv[1])
root = tree.getroot()
@be1
be1 / getsdcards.java
Last active Dec 7, 2015
getting sdcards path list on android
View getsdcards.java
private static String[] getSdcards() {
// Final set of paths
final Set<String> rv = new HashSet<String>();
// Primary physical SD-CARD (not emulated)
final String rawExternalStorage = System.getenv("EXTERNAL_STORAGE");
verboseDebug("EXTERNAL_STORAGE env is: " + rawExternalStorage);
// All Secondary SD-CARDs (all exclude primary) separated by ":"
final String rawSecondaryStoragesStr = System.getenv("SECONDARY_STORAGE");
verboseDebug("SECONDARY_STORAGE env is: " + rawSecondaryStoragesStr);
// Primary emulated SD-CARD
@be1
be1 / zimbra-soap.txt
Created Sep 2, 2010 — forked from MattMencel/zimbra-soap.txt
Zimbra 6.0.4 soap.txt file with json examples
View zimbra-soap.txt
REST URL for requesting content:
http://server/service/home/[&tilde;][{username}]/[{folder}]?[{query-params}]
fmt={ics, csv, etc}
id={item-id}
imap_id={item-imap-id}
part={mime-part}
query={search-query}
types={types} // when searching
auth={auth-types}