Skip to content

Instantly share code, notes, and snippets.

@Tyderion
Tyderion / Fix-SublimeTODO
Created November 15, 2012 18:31
SublimeTODO Error and fix
except IOError:
## Probably a broken symlink
f = None # Instead of pass
finally:
self.file_counter.increment()
if f is not None:
f.close()
@Tyderion
Tyderion / OpenActiveFile
Last active December 16, 2015 10:29
Applescript to open the document which is currently active in XCode 4.2 in sublimetext 3
tell application "Xcode"
activate
--display dialog "window1: " & (get name of window 0)
set CurrentActiveDocument to document 1 whose name ends with (word -1 of (get name of window 1))
set WhatYouWant to path of CurrentActiveDocument
end tell
tell application "Sublime Text 3"
activate (open WhatYouWant)
end tell
@Tyderion
Tyderion / Preferences.sublime-settings
Created May 24, 2013 13:07
Sublime Preferences File
{
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"detect_indentation": false,
"ensure_newline_at_eof_on_save": true,
"font_face": "Inconsolata",
"font_size": 16,
"ignored_packages":
[
"Vintage"
],
@Tyderion
Tyderion / gist:5648602
Created May 25, 2013 10:17
Map/Reduce for autohotkey
map(array, function, otherparams*)
{
if (function.name == "")
function := Func(function)
returnarray := []
For index, value in array
returnarray[index] := function.(value, otherparams*)
return returnarray
}
@Tyderion
Tyderion / gist:5661629
Last active December 17, 2015 19:39
Bash: Yes/No Case
case $yno in
[yY] | [yY][Ee][Ss] )
echo "Agreed"
;;
[nN] | [n|N][O|o] )
echo "Not agreed, you can't proceed the installation";
exit 1
;;
@Tyderion
Tyderion / gist:5684249
Created May 31, 2013 10:58
Tipps and Tricks
ADB
Only see browser log (console.log) in adb logcat: adb logcat browser:V *:S
@Tyderion
Tyderion / gist:5728783
Created June 7, 2013 12:03
Unicode Funny Stuff
Beer Mug: "\xF0\x9f\x8d\xba"
code-highlighter: http://softwaremaniacs.org/soft/highlight/en/
Host github-gist examples as homepage: http://bl.ocks.org/
@Tyderion
Tyderion / 000Readme.md
Last active December 20, 2015 17:58
Some Lua Stuff

##Closure / Table hybrid classes

Features:

  • Public/Private instance fields
  • Public/Private instance methods
  • public class methods/fields
  • inheritance (only 1 parent)

##Closure/table hybrid switch function