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
!!! 5 | |
%html{ :lang => "en"} | |
%head | |
%title= "Your Website" | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%meta{ :content => "3 days", :name => "revisit-after" } | |
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" } | |
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" } |
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
# Input rgb values 1...255 | |
# based on http://forums.devshed.com/c-programming-42/rgb-to-hsv-conversion-rountine-162526.html | |
r = r / 255.0 | |
g = g / 255.0 | |
b = b / 255.0 | |
max = [r, g, b].max | |
min = [r, g, b].min | |
delta = max - min | |
v = max * 100 |
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
/** | |
* Sea waves | |
*/ | |
#sky { | |
width: 100%; | |
height: 600px; | |
position: fixed; } | |
#sea { |
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
/** | |
* Flying a plane | |
*/ | |
#fly { | |
width: 300px; | |
background: #cacaca; | |
position: fixed; | |
right: -300px; | |
animation: fly 8s ease-in; |
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
/** | |
* A simple theremin | |
* Developed by the random bit | |
* http://therandombit.wordpress.com/2011/11/21/light-controlled-ldr-theremin/ | |
* | |
*/ | |
int val = 0; | |
void setup() { |
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
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e |
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
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson ([email protected]) | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so | |
# WP's redirect_canonical doesn't do an infinite redirect of / |
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
/*------- Grid -------*/ | |
$total-columns: 8; // 8 columns | |
$column-width: 4.5em; // columns are 4.5em wide | |
$gutter-width: 2em; // with 2em gutters | |
$grid-padding: 1em; // and 1em padding on the grid container | |
$container-style: magic; | |
.wrapper__inner { | |
@include clearfix(); |
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
import sys | |
last_line = None | |
for line in sys.stdin.readlines(): | |
if line != last_line: | |
sys.stdout.write(line) | |
last_line = line |
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
import sys | |
import argparse | |
import collections | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-c', action='store_const', const=True, required=False) | |
args = parser.parse_args() | |
lines = sys.stdin.readlines() | |
counter = collections.Counter(lines) |
OlderNewer