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
function! FindTranslation(pat) | |
let s = "" | |
ruby << EOF | |
pat = VIM::evaluate 'a:pat' | |
pat = pat.gsub("\.", ":\\\\\\n\ *") | |
s = "normal! gg/#{pat}/e+1\\<cr>" | |
VIM::command "let s = \"#{s}\"" | |
VIM::command "execute s" | |
EOF | |
endfunction |
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
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flask.helpers import url_for | |
from flask import request | |
import json | |
import re | |
app = Flask(__name__) | |
# helper method to extract parameters. reqest to api has the following format: |
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
echo "Showing old remote origin" | |
git remote -v | |
echo "--------" | |
NEW_REMOTE=$(git remote -v | head -n1 | awk '{print $2}' | sed -e 's/preek/munen/') | |
git remote set-url origin $NEW_REMOTE | |
if (( $? )); | |
then echo "failed to set new remote, please adjust manually"; | |
else echo "succeeded in setting new remote"; | |
fi | |
echo "--------" |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> | |
<style> | |
//.fill { | |
// visibility: hidden; | |
//} | |
</style> | |
<script> | |
$(document).ready(function() { |
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
var range = []; | |
for (var i = 1; i < 4000000; i++){ | |
range.push(i); | |
} | |
var fib_cache = { 0 : 0, 1 : 1 } | |
function fib(n) { | |
if (fib_cache[n] == undefined) { | |
fib_cache[n] = fib(n-1) + fib(n-2); |
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
var sum = 0 | |
var y = 0 | |
var z = 1 | |
var buff = 0; | |
while( y<4000000 ) | |
{ | |
if(y%2) | |
sum+=y; | |
buff=y+z; | |
y=z; |
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
# output bootstrap friendly markup | |
gem 'formtastic', :git => 'git://github.com/justinfrench/formtastic.git', :branch => '2.1-stable' | |
gem 'formtastic-bootstrap', :git => 'https://github.com/cgunther/formtastic-bootstrap.git', :branch => 'bootstrap2-rails3-2-formtastic-2-1' | |
# twitter bootstrap | |
gem 'anjlab-bootstrap-rails', '2.0.1.1', :require => 'bootstrap-rails' |
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
run Rack::Directory.new ('.') |
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
# --- NEW FILE: users_controller_spec.rb | |
describe UsersController do | |
context 'with required parameters' do | |
it 'creates a new entry' do | |
post :create, :user => { :name => "foo" } | |
User.first.name.should eq("foo") | |
end | |
end | |
end |