Skip to content

Instantly share code, notes, and snippets.

View antonioalmeida's full-sized avatar
🍺
Procastinating

António Almeida antonioalmeida

🍺
Procastinating
View GitHub Profile
@antonioalmeida
antonioalmeida / squareimages.sh
Created July 27, 2016 23:19
Squares all images in a directory (Requires ImageMagick)
for f in *.png
do
convert $f \
\( +clone -rotate 90 +clone -mosaic +level-colors white \) \
+swap -gravity center -composite "square $f"
done
@antonioalmeida
antonioalmeida / bissection.cpp
Last active October 4, 2016 11:03
Quick bissection implementation
//============================================================================
// Name : bissection.cpp
// Author : theantonioalmeida
// Description : Quick bissection implementation
//============================================================================
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
@antonioalmeida
antonioalmeida / init.lua
Last active December 15, 2016 16:34
My Hammerspoon's config file
-- Hammerspoon configuration, heavily influenced by sdegutis default configuration
-- init grid
hs.grid.MARGINX = 0
hs.grid.MARGINY = 0
hs.grid.GRIDWIDTH = 8
hs.grid.GRIDHEIGHT = 4
-- disable animation
hs.window.animationDuration = 0
@antonioalmeida
antonioalmeida / grayscaleImages.sh
Created January 3, 2017 01:29
Grayscales all files in a directory (Requires imagemagick)
for f in *
do
convert $f -type Grayscale "$f"
done