This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// taken from | |
// http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html | |
/* | |
Alert View with Prompt | |
Here's another generic class for you. This one doesn't require a navigation app - it can be used pretty much anywhere. It's a custom-subclass of UIAlertView that lets the user type in a value. It supports only two buttons - Okay and Cancel - but it handles everything to do with the text field for you. It looks like this: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Excel Versions) | |
NearestWeekEnding: | |
=IF(WEEKDAY(TODAY())<=4,TODAY()-(WEEKDAY(TODAY()-1)),TODAY()+(8-WEEKDAY(TODAY()))) | |
WeekEndingDate(inputcell,weindex): | |
inputcell = input date | |
weindex = day of week which is the end (1 = sunday, 7 = saturday) | |
=INT(IF(WEEKDAY(inputcell)=weindex,inputcell,IF(WEEKDAY(inputcell)>weindex,7,0)+inputcell+weindex-WEEKDAY(inputcell))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GIT_SSH="${HOME}/bin/socks-ssh" | |
#taken from http://mah.everybody.org/docs/ssh#run-ssh-agent | |
#credit Joseph M. Reagle http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace ReportAutomation | |
{ | |
public static class DateMath | |
{ | |
public static DateTime AddWorkingDays(this DateTime input, int interval, List<DateTime> holidays = null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin, datetime | |
#supports multiple selections/cursors | |
def replace_sel(view,edit,text): | |
s = set() | |
for r in view.sel(): | |
view.replace(edit, r, text) | |
e = r.begin()+text.__len__() | |
s.add(sublime.Region(e,e)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
LAZYBOOSH HOW TO USE | |
1. Notify channel when it will be (all the /c*** commands change the topic) | |
/cno <min> - eg /cno 30 | |
2. Start the compo (also open it in s3m.it) | |
/cstart <sample pack url> - eg /cstart https://dl.dropbox.com/u/3434534/lolpack.it | |
3. Don't forget to make your own entry, too | |
4. Notify when due | |
/cdue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WK_API_KEY = 'dick' #API key which will be used for general stuff | |
import requests, datetime, time, pytz, romkan | |
WK_CACHE_TIME = 10 * 60 | |
WK_MAX_LEVEL = 25 | |
WK_ALL_LEVELS = [x+1 for x in xrange(WK_MAX_LEVEL)] | |
WK_API_URL = 'http://www.wanikani.com/api/user/%s/%s/%s' | |
WK_UTC = pytz.utc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSString*) stringByCompactingWhitespaces:(NSString*) theString { | |
return [[[theString componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF != ''"]] componentsJoinedByString:@" "]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "hello, pork" | |
print "roll" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""\ | |
Python module for handling Impulse Tracker files. | |
(c) 2008 mike burke / mrb / [email protected] | |
doesn't and won't handle old format IT instruments (cmwt < 0x200), |
OlderNewer