Skip to content

Instantly share code, notes, and snippets.

@Tyderion
Tyderion / pact.recipe.py
Created April 5, 2014 18:24
create books from pact webserial: http://pactwebserial.wordpress.com/
import time
import re
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.web.feeds import Feed
from calibre.constants import config_dir, CONFIG_DIR_MODE
import os, os.path, urllib
from hashlib import md5
class PactRecipe(BasicNewsRecipe):
@Tyderion
Tyderion / DropboxConnectorPreference.java
Last active August 29, 2015 14:00
Preferences wrong default padding
package ch.isageek.tyderion.habittracker.settings;
import android.content.Context;
import android.preference.TwoStatePreference;
import android.util.AttributeSet;
import ch.isageek.tyderion.habittracker.R;
/**
* Created by tzhnaga1 on 24/04/14.
@Tyderion
Tyderion / gist:11289897
Created April 25, 2014 13:39
Sample Application which shows wrong padding when using Custom Preference with default layout
asdf
@Tyderion
Tyderion / CreateAppointment.vba
Created May 21, 2014 11:30
Create appointment from mail (Outlook 2013)
Sub CreateAppointmentFromMail()
Const mailItem_c As String = "MailItem"
Dim OE As Outlook.Explorer
Dim MI As Outlook.MailItem
Dim AI As Outlook.AppointmentItem
Dim TI As Outlook.TaskItem
Set OE = Application.ActiveExplorer
'Abort sub if no item selected:
@Tyderion
Tyderion / Things.md
Created September 12, 2014 08:58
Android Useful Libs
@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
;;