Skip to content

Instantly share code, notes, and snippets.

View jdzak's full-sized avatar

John Dzak jdzak

  • TXI
  • Chicago, IL
View GitHub Profile
@jdzak
jdzak / gist:ad38a9efd3444ddd85b8bfb69974a19c
Last active July 11, 2018 11:14
Encoding Fun with Kara
>> File.open("/Users/tablexi/Desktop/utf8", "r:UTF-8") { |f| f.each { |b| puts b.each_codepoint.to_a } }
241
10
=> #<File:/Users/tablexi/Desktop/utf8 (closed)>
>> File.open("/Users/tablexi/Desktop/latin1", "r:ISO-8859-1") { |f| f.each { |b| puts b.each_codepoint.to_a } }
241
10
=> #<File:/Users/tablexi/Desktop/latin1 (closed)>
>> File.open("/Users/tablexi/Desktop/latin1", "r:ISO-8859-1") { |f| f.each { |b| puts b.bytes } }
241
@jdzak
jdzak / gist:a75077d63635fac113264f97b5ec3bfa
Created September 28, 2017 18:44
Postgresql 9.6.5 post-install script
$ rpm -qp --scripts postgresql96-9.6.5-1PGDG.rhel6.x86_64.rpm
postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --install /usr/bin/psql pgsql-psql /usr/pgsql-9.6/bin/psql 960
/usr/sbin/update-alternatives --install /usr/bin/clusterdb pgsql-clusterdb /usr/pgsql-9.6/bin/clusterdb 960
/usr/sbin/update-alternatives --install /usr/bin/createdb pgsql-createdb /usr/pgsql-9.6/bin/createdb 960
/usr/sbin/update-alternatives --install /usr/bin/createlang pgsql-createlang /usr/pgsql-9.6/bin/createlang 960
/usr/sbin/update-alternatives --install /usr/bin/createuser pgsql-createuser /usr/pgsql-9.6/bin/createuser 960
/usr/sbin/update-alternatives --install /usr/bin/dropdb pgsql-dropdb /usr/pgsql-9.6/bin/dropdb 960
/usr/sbin/update-alternatives --install /usr/bin/droplang pgsql-droplang /usr/pgsql-9.6/bin/droplang 960
/usr/sbin/update-alternatives --install /usr/bin/dropuser pgsql-dropuser /usr/pgsql-9.6/bin/dropuser 960
{
"target_price": "$15.05",
"items": [
{
"name": "mixed fruit",
"price": "$2.15"
},
{
"name": "french fries",
"price": "$2.75"
{
"target_price": "$0.00",
"items": [
{
"name": "mixed fruit",
"price": "$2.15"
},
{
"name": "french fries",
"price": "$2.75"
@jdzak
jdzak / keybase.md
Created September 22, 2015 16:21
keybase.md

Keybase proof

I hereby claim:

  • I am jdzak on github.
  • I am jdzak (https://keybase.io/jdzak) on keybase.
  • I have a public key whose fingerprint is 241A C0A9 6916 FA08 8E74 AD4A 0478 1D00 22F1 64CB

To claim this, I am signing this object:

var nockBack = require("nock").back;
var http = require("http");
nockBack.fixtures = __dirname + "/fixtures";
nockBack.setMode("record");
describe('x', function() {
it('y', function(done) {
nockBack('whatever.json', function(nockDone) {
http.get("http://tablexi.com", function() {
@jdzak
jdzak / gist:3909757
Created October 18, 2012 03:45
test
test
diff --git a/fieldwork_schema.json b/fieldwork_schema.json
index e624942..3a78ddb 100644
--- a/fieldwork_schema.json
+++ b/fieldwork_schema.json
@@ -28,7 +28,6 @@
"$ref": "http://download.nubic.northwestern.edu/ncs_navigator/entity_id_schema.json#"
},
"disposition": {
- "required": true,
"type": [
diff --git a/fieldwork_schema.json b/fieldwork_schema.json
index e624942..7c4e5d5 100644
--- a/fieldwork_schema.json
+++ b/fieldwork_schema.json
@@ -1,459 +1,452 @@
{
- "$schema": "http://json-schema.org/draft-03/schema#",
- "additionalProperties": false,
- "description": "Field contact set",
+ "$schema": "http://json-schema.org/draft-03/schema#",
Pod::Spec.new do |s|
s.name = 'RestKit'
s.version = '0.9.3'
s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.'
s.homepage = 'http://www.restkit.org'
s.author = { 'Blake Watters' => 'blakewatters@gmail.com' }
s.source = { :git => 'https://github.com/RestKit/RestKit.git', :tag => '0.9.3' }
# It has no source_files itself, so the resolver should not allow dependencies on this spec unless it’s a `part_of' type dependency