Skip to content

Instantly share code, notes, and snippets.

View danielpunkass's full-sized avatar

Daniel Jalkut danielpunkass

View GitHub Profile
<table class="loginBox withShadow" style="width:95%"><tbody class="loginCredentials">
<tr><td class="sidePadded" style="font-weight:bold; padding-top: 5px;"><p align="left"><font face="verdana,geneva,arial,sans-serif" size="4" color="green"><b>Welcome to Business Online Banking!</b></font></p></td></tr>
<tr><td><hr></td></tr>
<tr><td class="sidePadded">Company ID</td></tr>
<tr><td class="sidePadded"><input type="text" class="loginCredentials required" style="width:90%" id="companyID" name="companyID" size="20" value="" onkeypress="submitOnEnter(event);">
<br><span id="err_companyID">
</span></td></tr>
echo "from AppKit import NSPasteboard\nprint NSPasteboard.pasteboardWithName_(\"IDESourceControlCommitMessagePasteboard\").stringForType_(\"IDESourceControlCommitMessagePboardType\")" | /usr/bin/python
echo "from AppKit import NSPasteboard\nNSPasteboard.pasteboardWithName_(\"IDESourceControlCommitMessagePasteboard\").releaseGlobally()" | python
@danielpunkass
danielpunkass / TestDate.py
Last active August 29, 2015 14:21
Example of NSDateformatter behaving unexpectedly
#!/usr/bin/python
from Foundation import *
form = NSDateFormatter.alloc().init()
# Explicit 24 hour time format used to trump any user settings (I think?)
form.setDateFormat_("HH:mm:ss")
print "Current locale is " + NSLocale.currentLocale().localeIdentifier()
@danielpunkass
danielpunkass / TestDate.command
Created May 26, 2015 17:02
Testing locale and date formatting
#!/usr/bin/python
from Foundation import *
form = NSDateFormatter.alloc().init()
form.setFormatterBehavior_(1040)
form.setDateFormat_("yyyyMMdd'T'HH:mm:ss'Z")
form.setTimeZone_(NSTimeZone.timeZoneForSecondsFromGMT_(0))
print "Implied locale is " + NSLocale.currentLocale().localeIdentifier()
print form.stringFromDate_(NSDate.date())
@danielpunkass
danielpunkass / TestDate.py
Created May 26, 2015 16:59
Example exercising NSDateFormatter with default locale
#!/usr/bin/python
from Foundation import *
form = NSDateFormatter.alloc().init()
form.setFormatterBehavior_(1040)
form.setDateFormat_("yyyyMMdd'T'HH:mm:ss'Z")
form.setTimeZone_(NSTimeZone.timeZoneForSecondsFromGMT_(0))
print "Implied locale is " + NSLocale.currentLocale().localeIdentifier()
print form.stringFromDate_(NSDate.date())
@danielpunkass
danielpunkass / BuildSettingPolicy.py
Created May 14, 2015 18:45
Build Setting Policy
#!/usr/bin/python
# Hard-code the build settings that we feel strongly should
# only be defined in a centralized location (.xcconfig files).
# These can also serve then to (at some point) confirm that the
# values are indeed being defined by the .xcconfig files
def forbiddenBuildSettingKeys():
return ["CLANG_CXX_LANGUAGE_STANDARD",
"CLANG_CXX_LIBRARY",
"CLANG_ENABLE_MODULES",
@danielpunkass
danielpunkass / GrabBlogLinks.py
Created February 4, 2015 21:38
Example of using xmlrpclib to efficiently fetch the posted entry URLs for all posts on a blog...
@danielpunkass
danielpunkass / XcodeBuildLogParser
Created January 16, 2015 14:29
Example configuration file for Jenkins's build log parser plugin, including some rules for Xcode quirks
# don't treat any of these as errors, warnings or info
ok /setenv /
# ignore TidyXML warnings
ok /line [0-9]+ column [0-9]+ - Error:/
ok /line [0-9]+ column [0-9]+ - Warning:/
ok /[0-9]+ warning.+ error.+ found!/
# ignore weird warnings about build variables in Info.plist:
# e.g. "warning: ignoring operator ':rfc1034Identifier' on 'RSWebClientCore' for macro 'PRODUCT_NAME'"
@danielpunkass
danielpunkass / _hg
Last active August 29, 2015 14:12 — forked from lies/_hg
#compdef hg
# Zsh completion script for mercurial. Rename this file to _hg and copy
# it into your zsh function path (/usr/share/zsh/site-functions for
# instance)
#
# If you do not want to install it globally, you can copy it somewhere
# else and add that directory to $fpath. This must be done before
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
# file could look like this: