Skip to content

Instantly share code, notes, and snippets.

View kuatsure's full-sized avatar

Jarrett Drouillard kuatsure

View GitHub Profile
@kuatsure
kuatsure / colortrans.py
Created July 12, 2017 21:39 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /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
for f in app/models/*;
do
NAME=${f##*/}
echo mkdir "app/pods/${NAME%.*}";
echo mv "$f" "app/pods/${NAME%.*}/model.js";
done;
@kuatsure
kuatsure / slack-sidebar-theme--dracula
Last active November 28, 2016 21:36
Slack Sidebar Theme - Dracula
#282A36,#44475A,#FFB86C,#F8F8F2,#6272A4,#F8F8F2,#BD93F9,#FF5555
@kuatsure
kuatsure / fizzbuzz.go
Last active July 13, 2016 16:30
FizzBuzz across multiple languages
// 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 / gist:6452268
Created September 5, 2013 16:07
adjusting your colors on the terminal? run this, it'll print out all the colors your computer is set for. each line is in that color
# pretty colors!
for code in {0..255}; do echo -e "$(tput setaf $code)\e[38;05;${code}m $code: Test"; done
@kuatsure
kuatsure / default.html
Created August 19, 2013 16:57
Set up a current-item navigation class based on page.tags in jekyll
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>{{ page.title }} - {{ site.name }}</title>
<meta charset='utf-8'>
@kuatsure
kuatsure / main.coffee
Created August 7, 2013 21:48
total godsend, don't know why I didn't do it this way to begin with ...
for elmt , i in array
console.log i, elmt
@kuatsure
kuatsure / 74a6bc39.screen.css
Created October 16, 2012 19:34
Yeoman -> index.html & gruntfile.js
body{background:red}/*! normalize.css v2.0.1 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}butt
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@kuatsure
kuatsure / themer.scss
Created August 21, 2015 14:27
sass maps and loops for compiling theme logic in a core.css
// 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,