Skip to content

Instantly share code, notes, and snippets.

View NZKoz's full-sized avatar

Michael Koziarski NZKoz

View GitHub Profile
@NZKoz
NZKoz / solar87
Created March 28, 2013 01:38
Riyadh Solar Time
# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# So much for footnotes about Saudi Arabia.
# Apparent noon times below are for Riyadh; your mileage will vary.
# Times were computed using formulas in the U.S. Naval Observatory's
# Almanac for Computers 1987; the formulas "will give EqT to an accuracy of
# [plus or minus two] seconds during the current year."
#
@NZKoz
NZKoz / apologies.text
Last active February 22, 2022 16:01
Template password compromise documentation
Dear [First Name],
We're really sorry but our systems were compromised and the attackers managed to take a copy
of your passwords.
The passwords were stored as:
[ ] Bcrypt hashes with a cost factor of X
[ ] PBKDF2 hashes with an iteration count of X
[ ] scrypt because I am Colin Percival
(lldb) po NSStringFromCGRect(self.frame)
error: property 'frame' not found on object of type 'SLComposeCardView *'
error: 1 errors parsing expression
(lldb) po NSStringFromCGRect([self frame])
error: no known method '-frame'; cast the message send to the method's return type
error: 1 errors parsing expression
(lldb) po NSStringFromCGRect((CGRect)[self frame])
error: 'NSStringFromCGRect' has unknown return type; cast the call to its declared return type
error: 1 errors parsing expression
(lldb) po (NSString *)NSStringFromCGRect((CGRect)[self frame])
Koz-Prostyle-2:store michaelkoziarski$ time /usr/bin/ruby -e ''
real 0m0.117s
user 0m0.031s
sys 0m0.056s
Koz-Prostyle-2:store michaelkoziarski$ time ~/.rbenv/shims/ruby -e ''
real 0m0.096s
user 0m0.057s
sys 0m0.038s
@NZKoz
NZKoz / sample
Created October 24, 2013 19:43
Tweetbot goes crazy
Sampling process 576 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Tweetbot (pid 576) every 1 millisecond
Process: Tweetbot [576]
Path: /Applications/Tweetbot.app/Contents/MacOS/Tweetbot
Load Address: 0x1041b1000
Identifier: com.tapbots.TweetbotMac
Version: 1.3.3 (13300)
Code Type: X86-64
Parent Process: launchd [250]
-(void) textViewDidChange:(UITextView *)textView {
[self updateBarButtonItemState];
[self _showTextViewCaretPosition:textView];
}
- (void)_showTextViewCaretPosition:(UITextView *)textView {
CGRect caretRect = [textView caretRectForPosition:self.textView.selectedTextRange.end];
[self.textView scrollRectToVisible:caretRect animated:NO];
}
Koz-Prostyle-2:local michaelkoziarski$ brew upgrade git
==> Upgrading 1 outdated package, with result:
git 1.8.3.4
==> Upgrading git
git: No `python` found in your PATH! Consider to `brew install python`.
Error: An unsatisfied requirement failed this build.
Koz-Prostyle-2:local michaelkoziarski$ python
Python 2.7 (r27:82500, Jul 30 2010, 09:55:50)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
@NZKoz
NZKoz / piss
Created August 12, 2013 01:31
fuck
piss
POST /mobileapi/Something HTTP/1.1
Host: example.com
Authorization: Token token="fuckpiss"
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5
Content-Length: 0
Connection: keep-alive
User-Agent: My Shit/1.9.0 (iPhone Simulator; iOS 6.1; Scale/2.00)
include_recipe "apt"
apt_repository "brightbox" do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
distribution node.lsb.codename
components ['main']
keyserver "keyserver.ubuntu.com"
key "C3173AA6"
action :add
end