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
# To enable files to be served from "./public/", the :static | |
# and :app_file options have to be set. | |
require 'rubygems' | |
require 'sinatra/base' | |
class App < Sinatra::Base | |
set :static, true | |
set :app_file, __FILE__ | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
doc = Nokogiri::HTML.parse(open('input.html'), nil, 'utf-8') | |
meta_content_type = Nokogiri::XML::Node.new 'meta', doc | |
meta_content_type['http-equiv'] = 'Content-Type' | |
meta_content_type['content'] = 'text/html; charset=utf-8' |
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
;;; This was installed by package-install.el. | |
;;; This provides support for the package system and | |
;;; interfacing with ELPA, the package archive. | |
;;; Move this code earlier if you want to reference | |
;;; packages in your .emacs. | |
(when | |
(load | |
(expand-file-name "~/.emacs.d/elpa/package.el")) | |
(package-initialize)) |
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 myMultiplierMaker = function(factor) { | |
var returnFunction = function(otherFactor) { | |
return factor * otherFactor; | |
} | |
return returnFunction; | |
} | |
var timesFive = myMultiplierMaker(5); | |
var timesSeven = myMultiplierMaker(7); |
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
(function(){ | |
if (typeof Object.create != 'function') { | |
Object.create = function(proto, propertiesObject) { | |
var pType = typeof propertiesObject; | |
if (pType == 'string' || pType == 'boolean' || pType == 'number') { | |
throw new TypeError('The second parameter to Object.create must be undefined or an object.'); | |
} | |
var Constructor = function() {}; | |
Constrcutor.prototype = proto; |
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
.selector { | |
background: #f8ab2f; | |
background: -webkit-gradient(radial, 40% 0, 0, 100% 100%, 100, | |
color-stop(0, rgba(251, 215, 57, 0.5)), | |
color-stop(1, rgba(246, 128, 38, 0.5))), | |
-webkit-gradient(linear, 0 0, 0 100%, | |
color-stop(0, #fbd739), | |
color-stop(1, #f68026)); | |
background: -webkit-linear-gradient(top, rgba(251, 215, 57, 0.5), rgba(246, 128, 38, 0.5)), | |
-webkit-radial-gradient(40% 0, farthest-corner, #fbd739, #f68026); |
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> | |
<html> | |
<head> | |
<title>test filtering</title> | |
</head> | |
<body> | |
<input name=filter> | |
<ul> | |
<li>Cat</li> | |
<li>Dog</li> |
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
$ bundle exec rake test | |
Loaded suite /Users/neal/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_test_loader | |
Started | |
...........................................................................................................................................................................................................................................................................................................................................................EEF.......................................................................................................................................................................................................................................................... | |
Finished in 11.928274 seconds. | |
1) Error: | |
test_call_import_on_VirtualBox_with_proper_base(ImportVMActionTest): | |
NoMethodError: undefined method `clear_line' for #<Vagrant::UI:0x00000100f43958> | |
/Users/neal/source/vagrant/lib/vagrant/action/vm/import.rb:20:in `call' |
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
#previous { | |
background: blue; | |
height: 10px; | |
} | |
#next { | |
background: green; | |
height: 10px; | |
} | |
#timeline-container { | |
position: relative; |
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
Object.defineProperty(Object.prototype, 'methToFunc', { | |
value: function(methodName) { | |
var method = this[methodName]; | |
if (typeof method === 'function') { | |
var curryArgs = [].slice.call(arguments, 1); | |
var that = this; | |
return function() { | |
return method.apply(that, curryArgs.concat(arguments)); | |
}; | |
} else { |
OlderNewer