Skip to content

Instantly share code, notes, and snippets.

@victorzinho
victorzinho / create-labels.js
Last active August 20, 2017 17:21
Create Github labels from a JSON file
const https = require('https');
const fs = require('fs');
const LABELS_FILE = 'labels.json';
if (!fs.existsSync(LABELS_FILE)) {
console.log(LABELS_FILE + ' does not exist!');
return 1;
} else if (process.argv.length !== 5) {
console.log('Usage:' + process.argv[0] + ' ' + process.argv[1] + ' <owner> <repo> <token>');
return 2;
@victorzinho
victorzinho / sync_toggl.py
Created November 18, 2015 10:39
Synchronize Toggl entries with Redmine
#!/usr/bin/env python
import os, sys, json, requests, datetime, pytz, urllib, re, traceback
DIR = os.path.dirname(sys.argv[0])
LAST_UPDATE_FILE = os.path.join(DIR, ".sync_toggl_last_update")
LOG_FILE = os.path.join(DIR, "sync_toggl.log")
# You can obtain client IDs from wid property in https://www.toggl.com/api/v8/clients
CLIENTS = [ <insert_your_client_here> ]