Skip to content

Instantly share code, notes, and snippets.

Kano tech-stack:

  • Stylus
  • Jade
  • Browserify
  • Superangent
  • Vue.js
  • Custom build tools
  • Gulp.js
@tancredi
tancredi / gist:11379407
Last active August 29, 2015 14:00
Waving Kano Judoka ASCII frames
_________
.' '.
/| \
| \_______ \
| / _ \_ |
'-' >- ( ) \./
| _____ | .----.
\ \___/ / ___ .' |
'.__ __.' __----' '. /
_____| |_____----' |----'
@tancredi
tancredi / mirror-text.js
Created May 1, 2014 11:32
Quick script to flip text horizontally (Needed to fix some ASCII art)
var fs = require('fs');
var src = process.argv[2],
out = '',
text;
if (!src) {
console.error('Arguments: source_file');
process.exit(1);
}
@tancredi
tancredi / frame-01
Last active August 29, 2015 14:00
ASCII Rabbit animation
.-.
\ \
\ \
\ \
___.--' '-.
__.---' o \
.' == o
.-+ ____/
@tancredi
tancredi / mirror-ascii-art.js
Created May 1, 2014 16:46
Quick node.js script to mirror ASCII art horizontally
var fs = require('fs');
var charsMap = [
[ '/', '(', '>' ],
[ '\\', ')', '<' ]
];
function run () {
var args = parseArgs(),
text = normalise(fs.readFileSync(args.src, 'utf8'));
@tancredi
tancredi / grid-system.scss
Created March 16, 2015 14:24
SCSS responsive grid generator mixin
@mixin grid-column ($span, $cols: 12) {
width: ($span * 100 / $cols) * 1%;
}
@mixin grid-offset ($span, $cols: 12) {
margin-left: (($span * 100) / $cols) * 1%;
}
@mixin grid-system ($cols: 12, $gutter: 20px, $child: '.col', $off: '.off', $all-columns: true, $separate: '-', $breakpoint: 650px) {
@include clearfix();
@tancredi
tancredi / job-titles-analysis.md
Last active August 29, 2015 14:21
Workshape.io Job Titles Analysis Results

Results

title seniority stack idiosyncratic descriptor
lead developer / product a... X
sr. c# wpf developer who l... X X X
full-stack engineer X
test analyst X
data engineer X
qa with a bit of ba hands ... X
@tancredi
tancredi / onceAnimationFinished.js
Created October 17, 2013 18:09
Function to attach a callback to the end of the current/next CSS animation. Useful when dealing with chained animations.
function getPrefixedEvents (str) {
var prefixes = [ '', 'webkit', 'o', 'MS', 'moz' ],
out = [],
i, prefix, cur;
for (i = 0; i < prefixes.length; i += 1) {
prefix = prefixes[i];
cur = prefix + str;
if (prefix.length < 2) {
@tancredi
tancredi / zap.zsh-theme
Created October 17, 2013 18:18
Simplest possible oh-my-zsh theme with git branch and dirty flag
#!/usr/bin/env zsh
PROMPT='%{$terminfo[bold]$fg[red]%}> %{$reset_color%}'
RPROMPT='%{$terminfo[bold]$fg[red]%}$(git_prompt_info) %{$fg[green]%}$(echo $USER)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
(function () {
var requestAnimFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) {
setTimeout(callback, 1000 / 60);
},
easing = {