Skip to content

Instantly share code, notes, and snippets.

View chills42's full-sized avatar

Craig Hills chills42

View GitHub Profile
Created device homerbot
deviceId: homerbot
generationId: 636196576163663461
etag: MA==
connectionState: Disconnected
status: enabled
statusReason: null
connectionStateUpdatedTime: 0001-01-01T00:00:00
statusUpdatedTime: 0001-01-01T00:00:00
lastActivityTime: 0001-01-01T00:00:00
@chills42
chills42 / Languages Used
Last active March 16, 2016 17:54
A quick listing of languages that I have used
Programming languages that I have used, in no particular order.
- C#
- ruby
- python
- javascript
- VB6
- VB .NET
- bash
- haskell

Keybase proof

I hereby claim:

  • I am chills42 on github.
  • I am chills (https://keybase.io/chills) on keybase.
  • I have a public key whose fingerprint is 7988 C52C B390 4876 C46A C032 60A7 5706 D0E6 C4AA

To claim this, I am signing this object:

# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-08-20 09:50:35 -0400 using RuboCop version 0.32.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
Metrics/AbcSize:
Max: 68
require 'benchmark/ips'
def group
(0..99).group_by { |i| i % 2 }
end
def push
even = []
odd = []
@chills42
chills42 / gist:50158b8e2d8870cdab4d
Created September 3, 2014 16:41
expansion error
/*
<std macros>:2:34: 4:6 warning: unused result which must be used, #[warn(unused_must_use)] on by default
<std macros>:2 ($dst:expr, $($arg:tt)*) => ({
<std macros>:3 format_args_method!($dst, write_fmt, $($arg)*)
<std macros>:4 })
<std macros>:1:1: 5:2 note: in expansion of write!
<std macros>:3:9: 3:51 note: expansion site
<std macros>:1:1: 5:2 note: in expansion of writeln!
/src/main.rs:70:9: 70:54 note: expansion site
*/
@chills42
chills42 / faraday_cert_auth.rb
Created July 11, 2014 19:37
Faraday client certificate authentication
# I'm starting with a .pfx, so the first step is to get it to a .pem caintaining the cert and key
# This can be done using the following command
#
# openssl pkcs12 -in certs/mycert.pfx -out certs/mycert.pem -nodes
#
require 'faraday'
require 'openssl'
# create an x509 certificate
@chills42
chills42 / gist:e049f254622a7279faf0
Created June 4, 2014 17:32
Forward slash URI unescaping
require 'sinatra'
# I would expect '/ab' to respond with 'false'
# I also expect '/a%2Fb' to respond with 'true'
# Neither option should 404
get '/:value' do |value|
(value=='a/b').to_s
end