Skip to content

Instantly share code, notes, and snippets.

@rdp
rdp / mess.cr
Created September 28, 2016 21:25 — forked from crisward/mess.cr
kemal mysql
require "./mess/*"
require "kemal"
require "json"
require "mysql"
require "pool/connection"
db = ConnectionPool.new(capacity: 25, timeout: 0.01) do
DB.open(ENV["DATABASE_URL"])
end
diff --git a/src/exception.cr b/src/exception.cr
index cd4450c..570e2fd 100644
--- a/src/exception.cr
+++ b/src/exception.cr
@@ -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
rdp / server.cr
Last active December 4, 2019 05:38 — forked from jgaskins/server.cr
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
@rdp
rdp / 0001-apple-keychain-integration-other-changes.patch
Created December 9, 2020 18:01 — forked from leonklingele/0001-apple-keychain-integration-other-changes.patch
openssh-{7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4}p1 patches for storing SSH passphrases in the OS X keychain. https://github.com/leonklingele/homebrew-dupes
From 1f00753130f44c0e29c34d95957f6eac2b2dcf45 Mon Sep 17 00:00:00 2001
From: Leon Klingele <git@leonklingele.de>
Date: Tue, 29 Sep 2020 18:21:13 +0200
Subject: [PATCH 1/2] apple-keychain-integration-other-changes
---
Makefile.in | 16 +-
audit-bsm.c | 7 +-
auth.c | 2 +-
authfd.c | 25 ++