Skip to content

Instantly share code, notes, and snippets.


Roger Pack rdp

View GitHub Profile
rdp /
Last active Dec 4, 2019 — forked from jgaskins/
Serve a sample JSON payload in Crystal
require "http"
require "uuid"
require "uuid/json"
class App
include HTTP::Handler
def call(context)
Fiber.yield # Simulate getting data from the DB
response_payload.to_json context.response
View crystal-on-cygwin.patch
diff --git a/src/ b/src/
index cd4450c..570e2fd 100644
--- a/src/
+++ b/src/
@@ -21,7 +21,11 @@ struct CallStack
makecontext_start = makecontext_end = LibDL.dlsym(LibDL::RTLD_DEFAULT, "makecontext")
while true
- ret = LibDL.dladdr(makecontext_end, out info)
+ ifdef cygwin
rdp /
Created Sep 28, 2016 — forked from crisward/
kemal mysql
require "./mess/*"
require "kemal"
require "json"
require "mysql"
require "pool/connection"
db = 25, timeout: 0.01) do["DATABASE_URL"])
rdp / seek.js
Created Sep 25, 2016 — forked from dannyid/seek.js
Netflix Seek
View seek.js
// The player
var player = netflix.cadmium.objects.videoPlayer();
// Metadata about current episode -- ID and url to get frame at a specific time
var episodeId = netflix.cadmium.metadata.getActiveVideo().episodeId;
var imgRoot = netflix.cadmium.metadata.getActiveVideo().progressImageRoot;
// Generates URL of preview image for given timestamp
function getFrame(timestamp) {
var t = Math.floor(timestamp/10000).toString(10);
View files_from_one_should_be_in_other.rb
if ARGV.length != 2
puts "syntax: dir_that_has_files_that_should_be_duplicated dir_that_should_have_those_files"
exit 1
def all_files_in_dir dir
all_in = {}
Dir[File.expand_path(dir) + "/**/*"].each{|f| # need expand path or in windows Dir["a\b/*"] failz <sigh>
if File.file? f
filename = File.basename(f)
View evp.diff
diff --git a/source_code/DibHelper.cpp b/source_code/DibHelper.cpp
index 4bfbd94..c8a02fe 100644
--- a/source_code/DibHelper.cpp
+++ b/source_code/DibHelper.cpp
@@ -165,7 +165,7 @@ boolean is_config_set_to_1(LPCTSTR szValueName) {
HKEY hKey;
- L"SOFTWARE\\screen-capture-recorder", 0, KEY_READ, &hKey);
+ L"SOFTWARE\\evp-capture", 0, KEY_READ, &hKey);
View jframe_fail.rb
require 'java'
class A < javax.swing.JFrame
def initialize *args
View ruby_map_demo.go
package main
import "fmt"
import "strings"
// some ruby #map type things, in golang
// mostly taken from!topic/golang-nuts/fgaeXCUEPC4
// apparently calling this out with specific types is faster than defining it generically to use interfaces:
func _map(coll []string, f func(string) string) []string {
var newColl = make([]string, len(coll))
View invisible_command.rb
require "rubygems"
require "ffi"
module WinProcess
extend FFI::Library
ffi_lib "kernel32"
ffi_convention :stdcall
class Error < StandardError
View close_socket.rb
require 'socket'
s =
s.bind(nil, 1234) { sleep 5; puts 'closing'; s.close; puts 'closed'}
puts 'if this exits with closed message, it works'
puts s.recvfrom(16)
You can’t perform that action at this time.