Skip to content

Instantly share code, notes, and snippets.

Jarrett Drouillard kuatsure

Block or report user

Report or block kuatsure

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kuatsure
kuatsure / colortrans.py
Created Jul 12, 2017 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
View colortrans.py
#! /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
View convert-to-ember-pods.sh
for f in app/models/*;
do
NAME=${f##*/}
echo mkdir "app/pods/${NAME%.*}";
echo mv "$f" "app/pods/${NAME%.*}/model.js";
done;
@kuatsure
kuatsure / fizzbuzz.go
Last active Jul 13, 2016
FizzBuzz across multiple languages
View fizzbuzz.go
// 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'.
@kuatsure
kuatsure / themer.scss
Created Aug 21, 2015
sass maps and loops for compiling theme logic in a core.css
View themer.scss
// 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,
@kuatsure
kuatsure / x.html
Created May 12, 2015
example picture element from an event apart digest issue 3
View x.html
<picture>
<source type="image/svg+xml" srcset="pic.svg">
<img src="pic.png" alt="">
</picture>
@kuatsure
kuatsure / SassMeister-input.scss
Created Mar 31, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// 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.
@kuatsure
kuatsure / SassMeister-input.scss
Created Mar 31, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// 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:
@kuatsure
kuatsure / ember-slack-theme.csv
Created Mar 27, 2015
sidebar theme for slack - emberized
View ember-slack-theme.csv
#F4ECE9 #F3735D #F2D1CB #444444 #F2D1CB #444444 #E1563F #E1563F
@kuatsure
kuatsure / SassMeister-input-HTML.html
Created Mar 5, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<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
@kuatsure
kuatsure / docIconHelper.coffee
Created Mar 2, 2015
quick switch to grab image path based on extension
View docIconHelper.coffee
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'
You can’t perform that action at this time.