Skip to content

Instantly share code, notes, and snippets.

View NZKoz's full-sized avatar

Michael Koziarski NZKoz

View GitHub Profile
@NZKoz
NZKoz / A File
Created July 22, 2008 15:51
lulz?
WTFsrsly
def gimme_yo_stuff
time = Time.now.httpdate
YOUR HTTP LIBRARY.GET(path, :headers=> {
"Accept" => ACCEPT,
"Date"=>time,
"Authorization"=>"#{@key_id}:#{signature_for_path(path, 'GET', time)}"
})
end
def signature_for_path(path, method, time)
@NZKoz
NZKoz / holyshit.log
Created February 17, 2014 20:34
Github Scares Koz
Koz-Prostyle-2:CLIENT-iPhone michaelkoziarski$ git st
## ios7...origin/ios7 [ahead 1]
Koz-Prostyle-2:CLIENT-iPhone michaelkoziarski$ git pull
From github.com:SouthgateLabs/CLIENT-iPhone
* [new branch] iOS7 -> origin/iOS7
Already up-to-date.
Koz-Prostyle-2:CLIENT-iPhone michaelkoziarski$ git branch -r
origin/HEAD -> origin/master
...
origin/iOS7

Keybase proof

I hereby claim:

  • I am NZKoz on github.
  • I am nzkoz (https://keybase.io/nzkoz) on keybase.
  • I have a public key whose fingerprint is 11A9 96B0 3D93 AC76 9E56 91BA C438 3E42 16E0 0312

To claim this, I am signing this object:

config.middleware.use "OldAcceptBehaviour", ["text/html", "application/xml", "text/javascript", "application/atom+xml"]
@NZKoz
NZKoz / apt.log
Last active August 29, 2015 14:04
Year of linux desktop
$ sudo aptitude install nginx
The following NEW packages will be installed:
nginx{b}
0 packages upgraded, 1 newly installed, 0 to remove and 81 not upgraded.
Need to get 5586 B of archives. After unpacking 95.2 kB will be used.
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.4.6-1ubuntu3) but it is not installable. or
nginx-full (>= 1.4.6-1ubuntu3) but it is not installable. or
nginx-light (>= 1.4.6-1ubuntu3) but it is not installable. or
nginx-extras (>= 1.4.6-1ubuntu3) but it is not installable. or
def subclasses_of(*superclasses) #:nodoc:
subclasses = []
superclasses.each do |sup|
ObjectSpace.each_object(class << sup; self; end) do |k|
if k != sup && (k.name.blank? || eval("defined?(::#{k}) && ::#{k}.object_id == k.object_id"))
subclasses << k
end
end
end
require 'pp'
class Time
class << self
alias_method :_original_load, :_load
def _load(marshaled_time)
time = _original_load(marshaled_time)
# utc = time.send(:remove_instance_variable, '@marshal_with_utc_coercion')
time
# utc ? time.utc : time
end
From 233020a2d01e9c4f0bfdd54657062312d2039a57 Mon Sep 17 00:00:00 2001
From: Michael Koziarski <michael@koziarski.com>
Date: Thu, 11 Sep 2008 16:03:38 +0200
Subject: [PATCH] Flesh out the parameterize method to support non-ascii text and underscores.
---
activesupport/lib/active_support/inflector.rb | 2 +-
activesupport/test/inflector_test_cases.rb | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -DHAVE_LIBPQ_FE_H -DHAVE_LIBPQ_LIBPQ_FS_H -I/opt/local/include/pgsql8 -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -c compat.c
In file included from compat.c:16:
compat.h:38:2: error: #error PostgreSQL client version too old, requires 7.3 or later.
In file included from compat.c:16:
compat.h:121: error: redefinition of typedef ‘PQnoticeReceiver’
/opt/local/include/pgsql8/libpq-fe.h:141: error: previous declaration of ‘PQnoticeReceiver’ was here
compat.h:125: error: redeclaration of enumerator ‘PQERRORS_TERSE’
/opt/local/include/pgsql8/libpq-fe.h:102: error: previous definition of ‘PQERRORS_TERSE’ was here
compat.h:126: error: redeclaration of enumerator ‘PQERRORS_DEFAULT’
/opt/local/include/pgsql8/libpq-fe.h:103: error: previous definition of ‘PQERRORS_DEFAULT’ was here