Michael Shapiro koudelka

View keybase.md

Keybase proof

I hereby claim:

  • I am koudelka on github.
  • I am koudelka (https://keybase.io/koudelka) on keybase.
  • I have a public key whose fingerprint is 7E62 AE05 4D2C 2331 76DF F5AC 81D1 A93F 604E 49B3

To claim this, I am signing this object:

View gist:5529764
1 2 3 4 5 6 7 8 9
require 'ruby-fann'
 
input_data = (0..20000).collect do |i|
[i * 0.0001]
end
 
output_data = input_data.collect do |i|
[Math.sin(i.first)]
end
View gist:4322700
1 2 3 4 5 6 7 8 9 10
var x = document.evaluate('//input[@value="Delete Request"]', document.documentElement, null, XPathResult.ANY_TYPE, null);
// gotta build an array of the elements, iterators throw exceptions if you modify the DOM from under them
var elements = [];
var thisNode = x.iterateNext();
while (thisNode) {
elements.push(thisNode);
thisNode = x.iterateNext();
}
View patch-src__retr.c.diff
1 2 3 4 5 6 7 8 9 10
--- retr.c.orig 2011-08-30 08:47:33.000000000 -0500
+++ retr.c 2012-02-04 13:01:29.000000000 -0600
@@ -944,6 +944,13 @@
set_uri_encoding (iri, opt.locale, true);
set_content_encoding (iri, opt.locale);
+ int input_url_len = strlen(opt.base_href) + strlen(file) + 1;
+ char *input_url = (char *)calloc(input_url_len, sizeof(char));
+ strcat(input_url, opt.base_href);
+ strcat(input_url, file);
View MacRubyCustomRubyCommand.diff
1 2 3 4 5 6 7 8 9 10
--- a/src/configure.in
+++ b/src/configure.in
@@ -993,11 +993,17 @@ AC_ARG_ENABLE(rubyinterp,
AC_MSG_RESULT($enable_rubyinterp)
if test "$enable_rubyinterp" = "yes"; then
AC_MSG_CHECKING(--with-ruby-command argument)
+ dnl If a ruby command was provided, set RUBY_CMD to the name of the binary and RUBY_PATH to its directory
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
- RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD),
- RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD))
View MacVim 1.9.1 patch.diff
1 2 3 4 5 6 7 8 9 10
diff --git a/src/configure.in b/src/configure.in
index 85df7da..c812062 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -996,72 +996,75 @@ if test "$enable_rubyinterp" = "yes"; then
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD),
RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD))
+ if test "X$vi_cv_path_ruby" = "X"; then
+ vi_cv_path_ruby=$withval
View gist:376199
1 2 3 4 5 6 7 8 9
class A
include Mongoid::Document
 
field :some_field
 
validates_presence_of :some_field
 
before_validate :set_some_field
after_validate Proc.new { p "after_validation" }
Something went wrong with that request. Please try again.