Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
<html> | |
<script> | |
var errorCallback = function(e) { | |
console.log('Rejected', e); | |
}; | |
function init(){ | |
navigator.getUserMedia = navigator.getUserMedia || | |
navigator.webkitGetUserMedia || | |
navigator.mozGetUserMedia || |
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559 | |
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder | |
--set theLines to paragraphs of theFileContents | |
set theLines to {"task name 1", "task name 2"} | |
repeat with eachLine in theLines | |
tell application "Reminders" | |
set mylist to list "Your List Name" | |
tell mylist | |
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"} |
Key Name Resulting Keystroke | |
{F1} - {F24} Function keys. For example: {F12} is the F12 key. | |
{!} ! | |
{#} # | |
{+} + | |
{^} ^ | |
{{} { | |
{}} } | |
{Enter} ENTER key on the main keyboard | |
{Escape} or {Esc} ESCAPE |
// alterkeys.c | |
// http://osxbook.com | |
// | |
// Complile using the following command line: | |
// gcc -Wall -o alterkeys alterkeys.c -framework ApplicationServices | |
// | |
// You need superuser privileges to create the event tap, unless accessibility | |
// is enabled. To do so, select the "Enable access for assistive devices" | |
// checkbox in the Universal Access system preference pane. |
<root> | |
<!-- | |
<devicevendordef> | |
<vendorname>thinkpad_trackpoint</vendorname> | |
<vendorid>0x17ef</vendorid> | |
</devicevendordef> | |
<deviceproductdef> | |
<productname>my_thinkpad_trackpoint</productname> | |
<productid>0x6009</productid> | |
</deviceproductdef> |
on run {input, parameters} | |
--version >= 7.99.5 | |
--use "launch application" step instead | |
--tell application "KeyRemap4MacBook" to activate | |
tell application "System Events" | |
--version >= 7.99.5 | |
tell application process "KeyRemap4MacBook" |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>7lemon custom settings</name> | |
<!-- | |
互换option键和command键(虚拟机和远程桌面除外) | |
外接键盘用。可配合"General"中的"Don't remap Apple's keyboards"使用 | |
--> | |
<item> | |
<name>Swap Option_L and Command_L</name> |
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |