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 'rubygems' | |
require 'tinder' | |
require 'uri' | |
class Food | |
def initialize(place=nil) | |
@place = place | |
end | |
def prefix |
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
# Use case: I use git mainly from the command line, but occasionally track commits with gitg. I prefer visual diffs. | |
# Inspired by http://jeetworks.org/node/90 | |
[diff] | |
tool = meld | |
[difftool] | |
prompt = false | |
[alias] | |
d = difftool |
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
<!DOCTYPE html> | |
<head> | |
<script type="text/javascript"> | |
var produkte = ["Sonnenbrillen", "Anzuege", "Kopfhoerer"]; | |
var zielgruppen = ["Vaeter", "Schlagerfans", "Tiere"]; | |
function randomArrayEl(arr) { | |
return arr[Math.floor(Math.random()*arr.length)]; | |
} | |
function generate() { | |
document.getElementById("produkt").textContent = randomArrayEl(produkte); |
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
{ | |
"directory" : "vendor/assets/components" | |
} |
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
guard 'rspec', cli: '--drb', all_on_start: false, all_after_pass: false do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { "spec" } | |
# Rails example | |
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } |
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
" Settings for vim-json | |
au! BufRead,BufNewFile *.json set filetype=json | |
au FileType json setlocal foldmethod=syntax | |
" Use jsonpp for auto-indendting | |
au FileType json setlocal equalprg=jsonpp\ - |
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
module RentARoleModel | |
class Application < Rails::Application | |
config.action_mailer.default_options = { from: "[email protected]" } | |
end | |
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
var ReadabilityDeleter = function () { | |
var readabilityColumnOnly = function(el) { | |
return el.innerHTML.indexOf("@readability.com") > 0; | |
}; | |
var queryReadabilityRows = function () { | |
var candidates = document.querySelectorAll("#orderList td.greyed"); | |
return Array.prototype.slice.call(candidates).filter(readabilityColumnOnly); | |
}; |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
packageJson: require('./package.json'), | |
shell: { | |
deploy: { | |
command: [ | |
'git show head "--format=oneline" | head -n 1 > .git/commitmsg', |
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
➜ ~ crystal eval '3.times { |n| puts n}' | |
0 | |
1 | |
2 | |
➜ ~ crystal eval '2..3.times { |n| puts n}' | |
0 | |
1 | |
2 | |
➜ ~ crystal eval '2...times { |n| puts n}' | |
/usr/local/bin/crystal: line 6: 80376 Segmentation fault: 11 "$INSTALL_DIR/embedded/bin/crystal" "$@" |
OlderNewer