Skip to content

Instantly share code, notes, and snippets.

View demoive's full-sized avatar

Paulo Ávila demoive

  • Barcelona
View GitHub Profile
@mjpieters
mjpieters / advent06.py
Last active December 23, 2015 18:14
Advent of Code fun
# Having fun with http://adventofcode.com/day/6 Advent of Code
import re
from itertools import product
from collections import defaultdict
try:
from PIL import Image
except ImportError:
@mattdesl
mattdesl / disallow-new.js
Last active February 22, 2023 10:48
avoiding new in classes
// Allows:
// funkyParser()
module.exports = function createFunkyParser(opt) {
return new FunkyParser(opt)
}
function FunkyParser(opt) {
// make params optional
opt = opt || {}
@martint
martint / notify.sh
Last active August 29, 2015 14:02
notify wrapper
# needs https://github.com/alloy/terminal-notifier
# brew install terminal-notifier
# to use, source this file or copy the code into your bashrc,
# then prefix your commands with "notify". E.g.,
#
# notify mvn clean install
#
notify() {
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@nicdaCosta
nicdaCosta / Grep.js
Last active March 9, 2024 13:39
Basic function that searches / filters any object or function and returns matched properties.
/*
Grep.js
Author : Nic da Costa ( @nic_daCosta )
Created : 2012/11/14
Version : 0.2
(c) Nic da Costa
License : MIT, GPL licenses
Overview:
Basic function that searches / filters any object or function and returns matched properties.
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE