Skip to content

Instantly share code, notes, and snippets.

View mikekelly's full-sized avatar

Mike Kelly mikekelly

View GitHub Profile
mikekelly / getPubKey.js
Created February 1, 2022 16:45 — forked from protortyp/getPubKey.js
Attempting to get the public key
View getPubKey.js
const ethers = require("ethers")
const pk =
const ad = "0xcD3edF915387E2555A829567cE0dBbC919834B82"
getPubKey = async () => {
const infuraProvider = new ethers.providers.JsonRpcProvider(
mikekelly / pksc7_verify.rb
Created March 19, 2021 22:57 — forked from zmajstor/pksc7_verify.rb
OpenSSL::PKCS7#verify test
View pksc7_verify.rb
require 'openssl'
require 'base64'
require "test/unit"
BODY = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"\">\n<plist version=\"1.0\">\n<dict>\n\t<key>Status</key>\n\t<string>Idle</string>\n\t<key>UDID</key>\n\t<string>b7ebaaa53fda9be2f7787eff7c1f4aca4e36f79d</string>\n</dict>\n</plist>\n"
mikekelly / ruby_cert.rb
Created February 28, 2021 20:19 — forked from VimleshS/ruby_cert.rb
Usage examples of ruby’s openssl lib
View ruby_cert.rb
require 'openssl'
require 'date'
require 'time'
mikekelly / base_consumer.rb
Last active November 13, 2015 10:38
A better consumer interface for hutch consumers
View base_consumer.rb
require 'hutch'
class BaseConsumer
# Ensure subclass is passed to Hutch::Consumer.included
def self.inherited(subclass)
subclass.include Hutch::Consumer
# Option to initialize a consumer with a message
def initialize(message: nil)
View orders.json
View gist:a7ce2ed97a291917daef
def create
card = current_user.credit_cards.create(card_params)
if card.persisted?
render :success
render :failure
mikekelly / example.rb
Last active August 29, 2015 13:57
Greppable, prefixed delegation
View example.rb
# un-greppable delegate API
class Foo
delegate :qux, to: :bar, prefix: true
# possible fixes to the API to make it greppable
class Foo
delegate :bar_qux, to: :bar, prefixed: true
View users_controller_service.rb
class UsersController < ApplicationController
def create
on_success: public_method(:create_successful),
on_failure: public_method(:create_failure)
def create_successful(user)

I believe that if we are honest with ourselves, that the most fascinating problem in the world is “who am I?” What do you mean? What do you feel when you say the word “I, myself”? I don’t think there can be anymore fascinating preoccupation than that because it is so mysterious. It is so elusive. Because what you are in your inmost being escapes your examination in rather the same way you cant look into your own eyes without a mirror, you can’t bite your own teeth, you can’t taste your own tongue and you can’t touch the end of one finger with the same finger. That is why there is always an element of profound mystery in the problem of who we are."

-- Alan Watts

View example.halo.json
"title":"Create a new widget",
"description":"Enter your widget info and submit to create a new widget",