Skip to content

Instantly share code, notes, and snippets.

View jordanluyke's full-sized avatar

Jordan Luyke jordanluyke

View GitHub Profile
@jordanluyke
jordanluyke / linked_list.rb
Last active September 2, 2020 03:03
Linked list example in Ruby
class Node
attr_accessor :value, :next_node
def initialize(value, next_node = nil)
@value = value
@next_node = next_node
end
end
class LinkedList
@jordanluyke
jordanluyke / linked_list.rb
Created February 27, 2014 20:02
Linked list in Ruby
class Node
attr_accessor :value, :next_node
def initialize(value, next_node = nil)
@value = value
@next_node = next_node
end
end
class LinkedList
@jordanluyke
jordanluyke / todo.rb
Created February 27, 2014 20:04
Todo module in Ruby; MVC
module Todo
require 'json'
class Controller
def initialize
@list = List.new
end
def run(args)
@list.read_input(args)

Keybase proof

I hereby claim:

  • I am jordanluyke on github.
  • I am jordanluyke (https://keybase.io/jordanluyke) on keybase.
  • I have a public key whose fingerprint is 5995 32B5 F3F1 9D60 0AE6 9769 EBFF 2AA7 F0CA 8574

To claim this, I am signing this object:

@jordanluyke
jordanluyke / Snapcard.cs
Last active August 29, 2015 14:07
SNAPCARD API Example
using System;
using System.IO;
using System.Net;
using System.Security.Cryptography;
using System.Text;
namespace apitest1
{
class MainClass
{
@jordanluyke
jordanluyke / snapcard_auth_example.rb
Created April 16, 2015 00:36
SNAPCARD auth example
require 'uri'
require 'net/http'
require 'digest/hmac'
require 'json'
class SnapcardApi
MERCHANT_ID = 'ue5hsnusf8gene87asdf4es23bt9d7ak'
API_KEY = '9idihi38o18mrm1234ipa1k9ooiifgts'
SEC_KEY = '5e3kcoogptge6s5fh2qwertyb6g368dm'
API_URL = 'https://api.snapcard.io'
@jordanluyke
jordanluyke / polygon
Created April 23, 2015 03:22
circa 2012
<!DOCTYPE html>
<html>
<head>
<title>polygons</title>
<script type="text/javascript">
var amount;
var size;
var X;
var Y;
window.onload = draw;
@jordanluyke
jordanluyke / multimap.ts
Last active June 13, 2023 14:16
TypeScript Multimap
export interface Multimap<K, V> {
clear(): void
containsKey(key: K): boolean
containsValue(value: V): boolean
containsEntry(key: K, value: V): boolean
delete(key: K, value?: V): boolean
entries: MultimapEntry<K, V>[]
get(key: K): V[]
keys(): K[]
put(key: K, value: V): MultimapEntry<K, V>[]
@jordanluyke
jordanluyke / vert.x.rb
Last active October 7, 2017 23:16
Homebrew VertX 2.1.5
require 'formula'
class VertX < Formula
homepage 'http://vertx.io/'
url 'http://dl.bintray.com/vertx/downloads/vert.x-2.1.5.tar.gz'
sha256 '66c31ee95363c6f70e88dc4e648988ca4a529ff587892372fbd52b1e1704e9a2'
def install
rm_f Dir["bin/*.bat"]
libexec.install %w[bin client conf lib]
@jordanluyke
jordanluyke / NettyHttpClient.java
Last active May 13, 2021 18:23
Netty Rx HTTP Client
package com.jordanluyke.example.util;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;