Skip to content

Instantly share code, notes, and snippets.

View ff6347's full-sized avatar
🤖
updating status…

Fabian Morón Zirfas ff6347

🤖
updating status…
View GitHub Profile
function setup() {
colorMode(HSB, 260, 100, 100, 100);
createCanvas(300, 300);
var a = 150;
var x = 10;
while (a < 360) {
fill(a, 75, 100);
rect(x, 0, 15, height);
a+=3;
x +=15;
@ff6347
ff6347 / ext.rb
Created September 26, 2016 11:26 — forked from pgib/ext.rb
Optional Jekyll monkey patch to use terminal-notifier to signal a Jekyll build completion. Put in _plugins/ext.rb
require 'jekyll-assets'
# optional notification for jekyll build completion
#
# gem install terminal-notifier
# rbenv rehash
#
module Jekyll
class Site
@ff6347
ff6347 / build-notifier.rb
Created September 26, 2016 11:14 — forked from nimf/build-notifier.rb
Posts a message to the OS X notification center when a Jekyll build is finished. Requires TerminalNotifier, see http://git.io/5X99Eg or “gem install terminal-notifier”.
begin
require 'terminal-notifier'
module Jekyll
class Site
alias jekyll_process process
def process
jekyll_process
TerminalNotifier.notify("🍻 Jekyll rebuild finished")
rescue => e
TerminalNotifier.notify("💥 Jekyll rebuild failed: #{e.message}")
@ff6347
ff6347 / README.md
Created September 26, 2016 09:22 — forked from veltman/README.md
Smoother polygon transitions

Smooth transitioning US tour in the same vein as this example. Steps:

  1. Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
  2. Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs

Some possible improvements:

  • Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
  • Tweaking the placement of added points with simulated annealing
  • Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled
@ff6347
ff6347 / README.md
Created September 6, 2016 08:05 — forked from zhuochun/README.md
List all posts, tags and categories in Jekyll. https://github.com/zhuochun/md-writer

List all posts, tags and categories in Jekyll.

Octopress users: if you found " is escaped in the generated JSON file, please change them to \". Refer to this issue.

@ff6347
ff6347 / Dockerfile
Created September 1, 2016 09:34 — forked from andyshinn/Dockerfile
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
var rows = [];
var gridSquareSize = 20;
function setup() {
createCanvas(windowWidth, windowHeight);
rectMode(CENTER);
stroke(255);
var amountOfRows = Math.max(windowHeight / gridSquareSize);
var amountOfColumns = Math.max(windowWidth / gridSquareSize);
for (let rowIndex = 0; rowIndex < amountOfRows; rowIndex++) {
var actualCharacter = -1;
var alphabet = 'abcdefghijklmnopqrstuvwxyz!?1234567890 ';
var word = window.prompt('Please a word or sentence you think is funny',
'badibaduba');
function setup() {
colorMode(HSB, alphabet.length, word.length, 1, 1);
createCanvas(windowWidth, windowHeight);
}
@ff6347
ff6347 / LICENSE-MIT
Created July 22, 2016 11:17 — forked from electricg/LICENSE-MIT
Stopwatch in javascript
Copyright (c) 2010-2015 Giulia Alfonsi <[email protected]>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
@ff6347
ff6347 / readLineSync.js
Created May 19, 2016 18:06 — forked from Basemm/readLineSync.js
Read file line by line "synchronous"
/**
* Read file line by line "synchronous"
*
* require nodejs ~0.11, run with "node --harmony"
*
* Example:
*
* var readLineSync = require('./readLineSync');
*
*