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
// Use of console.table() | |
var iKnow = [ | |
{ lenguage: "Ruby", level: 10 }, | |
{ lenguage: "Go", level: 5 }, | |
{ lenguage: ".Net", level: 8 }, | |
{ lenguage: "FoxPro", level: 10 } | |
]; | |
console.table(iKnow); |
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
/* Generated by Opal 0.5.4 */ | |
(function($opal) { | |
var self = $opal.top, $scope = $opal, nil = $opal.nil, $breaker = $opal.breaker, $slice = $opal.slice, $klass = $opal.klass, g = nil; | |
$opal.add_stubs(['$capitalize', '$puts', '$new', '$salute']); | |
(function($base, $super) { | |
function $Greeter(){}; | |
var self = $Greeter = $klass($base, $super, 'Greeter', $Greeter); | |
var def = $Greeter._proto, $scope = $Greeter._scope; | |
def.name = nil; |
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
--- | |
development: | |
:hosts: | |
- localhost:9200 |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"file_exclude_patterns": | |
[ | |
"*.pyc", | |
"*.pyo", |
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
#Hash function which converts hash_me("leep", dictionary) => 13427273 | |
def hash_me(text, dictionary) | |
h = 7 | |
dictionary = "acdegilmnoprstuw" | |
text.size.times do |i| | |
h = (h * 37) + dictionary.index(text[i]).to_i | |
end | |
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
cd /path/to/my/static/page | |
ruby -run -ehttpd . -p8000 |
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 median(array) | |
sorted = array.sort | |
len = sorted.length | |
return (sorted[(len - 1) / 2] + sorted[len / 2]) / 2.0 | |
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
require 'formula' | |
class Libstemmer < Formula | |
# upstream is constantly changing the tarball, | |
# so doing checksum verification here would require | |
# constant, rapid updates to this formula. | |
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz' | |
homepage 'http://snowball.tartarus.org/' | |
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
# ~/.gemrc | |
--- | |
:benchmark: false | |
:verbose: true | |
:update_sources: true | |
:sources: | |
- http://rubygems.org/ | |
:backtrace: false | |
:bulk_threshold: 1000 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script> | |
function addClick(){ | |
$("span.clickeable").live("click", function(){ | |
alert("clicked"); | |
}) | |
}; |
OlderNewer