Skip to content

Instantly share code, notes, and snippets.

View AntoineTurmel's full-sized avatar

Antoine Turmel AntoineTurmel

View GitHub Profile
// ==UserScript==
// @name Flickr RSS Feed
// @name:fr Flux RSS Flickr
// @namespace https://greasyfork.org/fr/users/11510-antoine-code
// @author Antoine Turmel
// @version 1.0.2
// @description Adds back RSS feeds to Flickr galleries
// @description:fr Réajoute le flux RSS des galeries Flickr
// @icon https://cloud.githubusercontent.com/assets/119288/7681140/9284a93e-fd6d-11e4-8854-89ab643b600a.png
// @icon64 https://cloud.githubusercontent.com/assets/119288/7681134/811317e4-fd6d-11e4-8350-2dac0d5f0d66.png
@AntoineTurmel
AntoineTurmel / idea.json
Created June 12, 2015 14:34
example of idea in json
{
"name": "My idea",
"author": "Me",
"submitdate": "2015-01-01",
"lastupdate": "2015-02-31",
"version": "0.1",
"shortdescription": "My idea is to change the world",
"longdescription": "Lorem Ideapsum",
"urls": {
"idea": "http://linktomyidea.com",
@AntoineTurmel
AntoineTurmel / search.js
Created July 1, 2012 00:31
Entity Tool
/**
* Saebekassebil <Jakob Miland> 2012
* GeekShadow <Antoine Turmel> 2012
*
* Put this file in top of the project directory
* $ node search.js
*
**/
var fs = require('fs'),
@AntoineTurmel
AntoineTurmel / test.js
Created July 14, 2012 00:14
using jxon
jxon = parser.parseXMLFile("http://www.scenemusic.net/demovibes/xml/queue/")
alert(jxon.playlist.queue.entry[2].song);
alert(jxon.playlist.now.entry.song);
@AntoineTurmel
AntoineTurmel / test.sh
Created October 31, 2012 15:49
Script to print strings id
#!/bin/bash
#Show 10 first lines with only the string id
head songbird.properties | sed 's!^\([^=]*\)=.*$!\1!'
/* =============================================================
* bootstrap-typeahead.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@AntoineTurmel
AntoineTurmel / reorder-properties.sh
Last active December 10, 2015 12:19
Script to reorder strings based on a file pattern
#!/bin/bash
# This script allow reorder of strings from a foreign .properties file
# based on the en-US file and keeping original comments
#en-US basefile
prop_base_file='/home/antoine/Dev/nightingale-l10n/locales/en-US/songbird/songbird.properties'
for lang_code in $(cat /home/antoine/Dev/songbird-l10n/shipped-locales)
do
@AntoineTurmel
AntoineTurmel / reorder-dtd.sh
Last active December 16, 2015 19:49
Script to reorder strings based on a file pattern
#!/bin/bash
# This script allow reorder of strings from a foreign .dtd file
# based on the en-US file and keeping original comments
#en-US base folder
dtd_base_folder='/home/antoine/Dev/nightingale-l10n/locales/en-US/songbird/'
for lang_code in $(cat /home/antoine/Dev/songbird-l10n/shipped-locales)
do
@AntoineTurmel
AntoineTurmel / missings_strings.py
Last active December 20, 2015 17:59
Using python-beautifulsoup, parsing translate website for missing strings
#!/usr/bin/python
import urllib
import sys
if len(sys.argv) == 1:
print "You must specify a locale"
else:
f = urllib.urlopen("http://translate.songbirdnest.com/languages/" + sys.argv[1])
#!/bin/bash
bz_user=
bz_pass=
tx_api_url="http://beta.babelzilla.org/api/2/project/"
tx_project="ngaletest"
curl -L --user $bz_user:$bz_pass -X GET $tx_api_url$tx_project/resources/ > filelist.json
cat filelist.json | grep slug | sed -e 's/"slug": "//g' | sed -e 's/",//g' | sed -e 's/ //g' > filelist