Skip to content

Instantly share code, notes, and snippets.

View jkrall's full-sized avatar

Joshua Krall jkrall

View GitHub Profile
@jkrall
jkrall / gist:b87cd1ffeb3f2ec589bf
Created November 3, 2014 23:08
Custom patch for installing ruby 1.9.2-p290 on CentOS 6.5
--- /ext/openssl/ossl_pkey_ec.c (revision 41807)
+++ /ext/openssl/ossl_pkey_ec.c (revision 41808)
@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(in https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_pkey_ec.c#L762
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
+#endif
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
Daemons.run_proc('PassengerMonitor') do
command = 'sudo passenger-memory-stats'
memory_limit = 250
#!/usr/local/bin/ruby
#
# save-history.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKAkeiju@ruby-lang.org)
#
# --
#
@jkrall
jkrall / gist:257241
Created December 15, 2009 19:57 — forked from dhh/gist:29752
config.action_controller.asset_host = Proc.new do |source, request|
non_ssl_host = "http://asset#{source.hash % 4}.backpackit.com"
ssl_host = "https://asset1.backpackit.com"
if request.ssl?
case
when source =~ /\.js$/
ssl_host
when request.headers["USER_AGENT"] =~ /(Safari)/
non_ssl_host
@jkrall
jkrall / ANOPP2.err
Last active September 4, 2015 17:26
FILE: ObserverResultClass.f03, LINE: 9950
Arrays that should be the same size are not.
Size of number of segments not equal to the number of nodes.
@jkrall
jkrall / HandlebarViewEngine.cs
Created July 13, 2016 06:49
Handlebars.Net NancyFx View Engine
namespace Nancy.ViewEngines.Handlebars
{
using System;
using System.Collections.Generic;
using System.IO;
using global::HandlebarsDotNet;
using Nancy.Responses;
@jkrall
jkrall / sample.tsx
Created April 15, 2020 08:10
custom component w/ overridden filter params
import React, { useEffect, useState } from "react";
import { AxiosResponse } from "axios";
import { useHistory, useLocation } from "react-router";
import {
ActionProps,
RecordsTable,
RecordJSON,
useNotice,
useTranslation,