Skip to content

Instantly share code, notes, and snippets.

View BenjaminVanRyseghem's full-sized avatar

Benjamin Van Ryseghem BenjaminVanRyseghem

View GitHub Profile
@iwinux
iwinux / dump-doit-im.py
Created January 14, 2013 16:19
Dump Doit.im to JSON (can be imported to Taskwarrior) **BACKUP YOUR DATA BEFORE TRYING**
# encoding: utf-8
from __future__ import print_function
from json import dumps as to_json
from datetime import datetime, timedelta
import requests
URL_BASE="https://i.doit.im/tasks/%s"
DOIT_BOXES = ('inbox', 'today', 'next', 'tomorrow', 'scheduled', 'someday', 'waiting')
COOKIES = { 'autologin': 'Your Autologin Cookie Here' }
@0xced
0xced / CopyLaunchedApplicationsInFrontToBackOrder.c
Created August 7, 2009 14:06
Get an array of running applications ordered by last use
#import <Carbon/Carbon.h>
#import <dlfcn.h>
/*
* Returns an array of CFDictionaryRef types, each of which contains information about one of the processes.
* The processes are ordered in front to back, i.e. in the same order they appear when typing command + tab, from left to right.
* See the ProcessInformationCopyDictionary function documentation for the keys used in the dictionaries.
* If something goes wrong, then this function returns NULL.
*/
CFArrayRef CopyLaunchedApplicationsInFrontToBackOrder(void)