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: 9px; | |
#first #one > #1 { | |
height: 100%; | |
width: 50%; | |
#second, #2nd { | |
color: blue; | |
#third, #3rd { | |
display: block; | |
width: @var; |
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
/* | |
Less file | |
*/ | |
@width: 20px; | |
@color: orange; | |
.mixin { border: 1px solid black; } | |
.mixout { border-color: orange; } |
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
class Question < IO | |
def initialize out = 1, mode = "w" | |
super | |
end | |
def puts str | |
super str + "?" | |
end | |
def print str |
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
doubleMe x = x + x | |
doubleUs x y = doubleMe x + doubleMe y | |
doubleSmallNumber x = if x < 100 | |
then x * 2 | |
else x | |
eoeo xs = [if mod x 2 == 0 then 'e' else 'o' | x <- xs] | |
length'' xs = sum [1 | _ <- xs] | |
combo xs ys = [x ++ " " ++ y | x <- xs, y <- ys] | |
nestedEven xxs = [[ x | x <- xs, even x] | xs <- xxs] |
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 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'open-uri' | |
require 'json' | |
require 'cgi' | |
ANSI_YELLOW = "\033[1;33m" | |
ANSI_PURPLE = "\033[0;35m" | |
ANSI_LPURPLE = "\033[1;35m" |
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
CLEAR=$'\e[00m' | |
BLACK=$'\e[0;30m' | |
RED=$'\e[0;31m' | |
GREEN=$'\e[0;32m' | |
YELLOW=$'\e[0;33m' | |
BLUE=$'\e[0;34m' | |
PURPLE=$'\e[0;35m' | |
CYAN=$'\e[0;36m' | |
WHITE=$'\e[0;37m' |
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
-- Project Euler in Haskell -- | |
-- by cloudhead -- | |
-- "there's some real nasty code in here" | |
import Char | |
-- Some useful functions | |
-- | |
prime :: Integer -> Bool |
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
class Object | |
def expect m | |
(class << self; self; end).class_eval do | |
define_method("#{m}_") do | |
$expected = true | |
send("__#{m}__") | |
end | |
alias :"__#{m}__" :"#{m}" | |
alias :"#{m}" :"#{m}_" |
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 'rubygems' | |
require 'action_view' | |
require 'active_support' | |
class MenuItem | |
include ActionView::Helpers::TagHelper, | |
ActionView::Helpers::UrlHelper | |
attr_accessor :children, :link | |
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 Router = { | |
context: { | |
from: function(arg) { | |
return { | |
to: function(arg) { return arg; } | |
} | |
} | |
}, | |
map: function(block) { |