This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'openid/store/interface' | |
| module OpenID::Store | |
| class Association | |
| include Mongoid::Document | |
| field :secret, :type => Binary | |
| def from_record | |
| OpenID::Association.new(handle, secret.to_s, issued, lifetime, assoc_type) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ~/.tmux.conf | |
| # | |
| # See the following files: | |
| # | |
| # /opt/local/share/doc/tmux/t-williams.conf | |
| # /opt/local/share/doc/tmux/screen-keys.conf | |
| # /opt/local/share/doc/tmux/vim-keys.conf | |
| # | |
| # URLs to read: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.Source | |
| import scala.util.control.Breaks._ | |
| /** | |
| * Scala TicTacToe game without any side effects | |
| * | |
| * Written in response to following post (which also contains task description): | |
| * http://blog.tmorris.net/scala-exercise-with-types-and-abstraction/ | |
| */ | |
| object TicTacToe { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public abstract class ExpressionVisitorBase<TState> | |
| { | |
| public class ExpressionNotSupportedException : Exception | |
| { | |
| public ExpressionNotSupportedException(Expression expression) : | |
| base(string.Format("Expression {0} not supported.", expression.GetType().Name)) { } | |
| } | |
| public virtual TState Visit(Expression node) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn reverse*-cps [x k] | |
| (cond | |
| (nil? (seq x)) (apply-cont k []) | |
| (seq? (first x)) | |
| (recur (rest x) ; <-- HERE | |
| (fn [new-tail] | |
| (reverse*-cps (first x) | |
| (fn [new-head] | |
| (snoc-cps new-tail new-head k))))) | |
| :else (recur (rest x) ; <-- AND HERE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn reverse*-cps [x k] | |
| (cond | |
| (nil? (seq x)) | |
| (trampoline #(apply-cont k '[])) ; <-- HERE | |
| (seq? (first x)) | |
| (recur (rest x) | |
| (fn [new-tail] | |
| (reverse*-cps (first x) | |
| (fn [new-head] | |
| (snoc-cps new-tail new-head k))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn reverse*-cps [x k] | |
| (cond | |
| (nil? (seq x)) | |
| (trampoline #(apply-cont k '[])) | |
| (seq? (first x)) | |
| (recur (rest x) | |
| (fn [new-tail] | |
| #(reverse*-cps (first x) ; <-- HERE | |
| (fn [new-head] | |
| (snoc-cps new-tail new-head k))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'terminal-table/import' | |
| class SubsetSumMatrix | |
| class << self | |
| def create_empty_for(array) | |
| matrix = [] | |
| header = [nil] + build_header_from(array) | |
| matrix << header | |
| array.each_with_index do |element,i| | |
| row = header.collect{|value| 'F'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Data.SqlClient; | |
| using System.Reflection.Emit; | |
| using System.Collections.Concurrent; | |
| using System.Data; | |
| using System.Reflection; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* | |
| * Finder Open iTerm Here - v1.0.2 - 4/14/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| *) | |
| tell application "Finder" |