Skip to content

Instantly share code, notes, and snippets.

@jshawl
jshawl / precess-input-1397235393.scss
Created April 11, 2014 16:56
a precess production
$track-icons: 'hairtechnique', 'hairtexture', 'barber', 'makeup', 'nail', 'business', 'genericplaceholder';
div{
@for $i from 1 through length($track-icons){
&.#{nth( $track-icons , $i )}{
position:relative;
&:after{
content:'';
display:block;
position:absolute;
height:70px;
#!/usr/bin/env ruby
require 'open-uri'
require 'socket'
require 'net/http'
require 'net/https'
p Time.now.strftime("%d/%m/%Y %H:%M")
domain = '...'
current_ip = open('http://whatismyip.akamai.com').read
html, body{
height:100%;
background:#222;
}
body{
display:flex;
align-items:center;
justify-content:center;
}
html, body{
height:100%;
background:#222;
}
body{
display:flex;
align-items:center;
justify-content:center;
}
(1..100).each do |i|
line = i % 3 == 0 ? 'fizz ' : ''
line += i % 5 == 0 ? 'buzz' : ''
line.empty? ? puts(i) : puts(line)
end
require 'pp'
require 'ostruct'
require 'yaml'
require 'jekyll'
require 'date'
require 'digest/md5'
require 'action_view'
require 'rexml/document'
require 'uri'
<!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>
#!/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.
@jshawl
jshawl / wget.rb
Last active August 29, 2015 14:02
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 }