This file contains 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
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# tmux prefix | |
unbind C-b | |
set -g prefix C-o | |
# move around panes like in vim (only in tmux 1.6) | |
bind j select-pane -D |
This file contains 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
== Compilation error on file lib/phoenix/code_reloader.ex == | |
** (CompileError) lib/phoenix/code_reloader.ex:61: function full_path/1 undefined | |
(stdlib) lists.erl:1336: :lists.foreach/2 | |
(stdlib) erl_eval.erl:657: :erl_eval.do_apply/6 | |
could not compile dependency phoenix, mix compile failed. You can recompile this dependency with `mix deps.compile phoenix` or update it with `mix deps.update phoenix` |
This file contains 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
protocol Enumerable not implemented for %Dashex.Project{__meta__: %Ecto.Schema.Metadata{source: "projects", state: :loaded}, badges: [%Dashex.Badge{__meta__: %Ecto.Schema.Metadata{source: "badges", state: :loaded}, id: 5, image_url: "https://img.shields.io/travis/bitpay/ruby-client.svg?style=flat-square", inserted_at: %Ecto.DateTime{day: 12, hour: 21, min: 57, month: 6, sec: 41, usec: 0, year: 2015}, name: "Travis", project: #Ecto.Association.NotLoaded, project_id: 6, updated_at: %Ecto.DateTime{day: 12, hour: 21, min: 57, month: 6, sec: 41, usec: 0, year: 2015}}, %Dashex.Badge{__meta__: %Ecto.Schema.Metadata{source: "badges", state: :loaded}, id: 8, image_url: "https://img.shields.io/codeclimate/github/bitpay/ruby-client.svg?style=flat-square", inserted_at: %Ecto.DateTime{day: 12, hour: 22, min: 0, month: 6, sec: 55, usec: 0, year: 2015}, name: "Code Climate", project: #Ecto.Association.NotLoaded, project_id: 6, updated_at: %Ecto.DateTime{day: 12, hour: 22, min: 0, month: 6, sec: 55, usec: 0, year: 2015}}], h |
This file contains 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 "minitest/autorun" | |
class Hash | |
def symogriform | |
symogriformed = {} | |
symogrified = self | |
symogrified.keys.each do |key| | |
if symogrified[key].is_a?(Hash) | |
symogrified[key] = symogrified[key].symogriform | |
end | |
end |
This file contains 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
package svnhelpers; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import org.apache.commons.collections.CollectionUtils; | |
import org.apache.commons.collections.TransformerUtils; | |
import org.tmatesoft.svn.core.SVNDirEntry; | |
import org.tmatesoft.svn.core.SVNException; | |
import org.tmatesoft.svn.core.SVNURL; |
This file contains 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
module Enumerable | |
def hashmogrify(&block) | |
hash = {} | |
self.each do |e| | |
result = block.call(e) | |
if result.is_a?(Array) | |
hash[result[0]] = result[1] | |
else | |
hash[result] = e |
This file contains 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
def binary_search search_array, key | |
if search_array[search_array.length/2] == key then return search_array.length/2 end | |
if search_array[search_array.length/2] < key then binary_search (search_array(search_array.length/2...search_array.length), key) end | |
if search_array[search_array.length/2] > key then binary_search(search_array(0..search_array.length/2), key) end | |
end |
This file contains 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
fiboRecursive := method(nth_value, if(nth_value <= 2, 1, | |
(fiboRecursive(nth_value - 2) + fiboRecursive(nth_value - 1)) | |
)) | |
fiboIterative := method(nth_value, value_list := list(0,1,1); | |
for(i, 0, nth_value, | |
if (value_list at (i), value_list at (i), | |
value_list append (value_list at (i-1) + value_list at (i-2) ) ) ); | |
value_list at (nth_value) ) |
This file contains 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
"I am outraged at this outrageous abuse" println | |
OutragedGuy := Object clone | |
OutragedGuy rage := method("I am extremely outraged at this outrageous outrageousness!" println) | |
"Oh, really?" println | |
OutragedGuy rage |
This file contains 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
array2 = [] | |
16.times{array2 << rand(100)} | |
[0,1,2,3].each{|index| 4.times{print array2[index], " ";index+=4};print "\n"} |