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
@for $i from 1 through 80{ | |
@media all and ( min-width: #{$i}em ){ | |
body{ | |
@if $i == 1{ | |
height:100%; | |
border-style:solid; | |
border-color:hotpink | |
} | |
border-width: #{$i}px; |
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
@for $i from 1 through 3{ | |
@media all and ( min-width: #{$i}em ){ | |
body{ | |
@if $i == 1{ | |
height:100%; | |
border-style:solid; | |
border-color:hotpink | |
} | |
border-width: #{$i}px; |
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 'net/https' | |
require 'cgi' | |
require 'uri' | |
begin | |
require 'json' | |
rescue LoadError | |
require File.join File.dirname(File.dirname(__FILE__)), 'vendor', 'json.rb' | |
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
$color: blue; | |
a{ | |
background:$color; | |
} | |
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 'open-uri' | |
require 'nokogiri' | |
link = "http://entrenchant.blogspot.ch/2012/02/web-page-mirroring-wget-in-ruby.html?m=1" | |
now = Time.now.to_i.to_s | |
@doc = Nokogiri::HTML(open( link )) | |
@css_tags = @doc.css('[rel="stylesheet"]').map { |l| URI.join( link, l['href'] ).to_s } |
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 | |
# faux-wget.rb : example of performing wget-style mirroring | |
require 'nokogiri' | |
require 'net/http' | |
require 'fileutils' | |
require 'uri' | |
=begin rdoc | |
Wrap a URI and provide methods for download, parsing, and mirroring of remote HTML document. |
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> | |
<meta charset="UTF-8"> | |
<title>CodePen - A Pen by tkazi</title> | |
<link rel="stylesheet" href="style.css" media="screen" type="text/css" /> | |
</head> | |
<body> | |
<div class="ordered"> | |
<h3>ordered</h3> |
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 'pp' | |
require 'ostruct' | |
require 'yaml' | |
require 'jekyll' | |
require 'date' | |
require 'digest/md5' | |
require 'action_view' | |
require 'rexml/document' | |
require 'uri' |
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
(1..100).each do |i| | |
line = i % 3 == 0 ? 'fizz ' : '' | |
line += i % 5 == 0 ? 'buzz' : '' | |
line.empty? ? puts(i) : puts(line) | |
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
html, body{ | |
height:100%; | |
background:#222; | |
} | |
body{ | |
display:flex; | |
align-items:center; | |
justify-content:center; | |
} |