Skip to content

Instantly share code, notes, and snippets.

Joshua Krall jkrall

Block or report user

Report or block jkrall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jkrall
jkrall / HandlebarViewEngine.cs
Created Jul 13, 2016
Handlebars.Net NancyFx View Engine
View HandlebarViewEngine.cs
namespace Nancy.ViewEngines.Handlebars
{
using System;
using System.Collections.Generic;
using System.IO;
using global::HandlebarsDotNet;
using Nancy.Responses;
View ANOPP2.err
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 / gist:b87cd1ffeb3f2ec589bf
Created Nov 3, 2014
Custom patch for installing ruby 1.9.2-p290 on CentOS 6.5
View gist:b87cd1ffeb3f2ec589bf
--- /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
View gist:257241
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
View save-history.rb
#!/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)
#
# --
#
View gist:242766
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
Daemons.run_proc('PassengerMonitor') do
command = 'sudo passenger-memory-stats'
memory_limit = 250
You can’t perform that action at this time.