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 python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
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 f in app/models/*; | |
do | |
NAME=${f##*/} | |
echo mkdir "app/pods/${NAME%.*}"; | |
echo mv "$f" "app/pods/${NAME%.*}/model.js"; | |
done; |
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
// A concurrent prime sieve | |
package main | |
import "fmt" | |
// Send the sequence 2, 3, 4, ... to channel 'ch'. | |
func Generate(ch chan<- int) { | |
for i := 2; ; i++ { | |
ch <- i // Send 'i' to channel 'ch'. |
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
// Themes list and color maps | |
$themes: ( | |
'base': ( | |
brand-color: #1ab6df, | |
main-nav-bg: #204474, | |
bg-mod-one: #ee6700, | |
bg-mod-two: #0077b4, | |
bg-mod-three: #009bac, | |
bg-mod-four: #008b45, | |
bg-mod-five: #204474, |
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
<picture> | |
<source type="image/svg+xml" srcset="pic.svg"> | |
<img src="pic.png" alt="…"> | |
</picture> |
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
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
/// Original idea from Harry Roberts | |
/// http://sassmeister.com/gist/20b62018e8143bc7f3fc | |
/// I pushed it a bit further by allowing subkeys in themes. | |
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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
/* | |
This is a mixin that allows you to dynamically create selectors on anything. | |
This is useful for split text animations, like below. | |
JS to split text into individual parts: |
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
#F4ECE9 | #F3735D | #F2D1CB | #444444 | #F2D1CB | #444444 | #E1563F | #E1563F |
---|
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
<div class='page'>Cras lorem ligula, pretium a purus nec, elementum aliquam est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit maximus neque a venenatis. Praesent in nibh lobortis, luctus lectus non, suscipit dolor. Morbi vel lacus dignissim, rhoncus turpis sed, consequat ipsum. Sed egestas volutpat arcu eget efficitur. Interdum et malesuada fames ac ante ipsum primis in faucibus. In id laoreet arcu. Pellentesque sollicitudin molestie lacus non efficitur. Quisque viverra erat vel eros rutrum, a ultrices quam luctus.Cras lorem ligula, pretium a purus nec, elementum aliquam est. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit maximus neque a venenatis. Praesent in nibh lobortis, luctus lectus non, suscipit dolor. Morbi vel lacus dignissim, rhoncus turpis sed, consequat ipsum. Sed egestas volutpat arcu eget efficitur. Interdum et malesuada fames ac ante ipsum primis in faucibus. In id lao |
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
app.docIconHelper = ( extension ) -> | |
switch extension | |
when 'xlsx', 'xls' then icon = 'excel' | |
when 'docx', 'doc' then icon = 'word' | |
when 'pptx', 'ppt' then icon = 'powerpoint' | |
when 'bmp', 'png', 'jpg', 'jpeg' then icon = 'image' | |
when 'html', 'aspx', 'htm', 'asp', 'php' then icon = 'link' | |
when 'pdf' then icon = 'pdf' | |
when 'mov', 'mp4' then icon = 'video' | |
else icon = 'blank' |
NewerOlder