Skip to content

Instantly share code, notes, and snippets.

Avatar
🍺
Procastinating

António Almeida antonioalmeida

🍺
Procastinating
View GitHub Profile
@antonioalmeida
antonioalmeida / grayscaleImages.sh
Created Jan 3, 2017
Grayscales all files in a directory (Requires imagemagick)
View grayscaleImages.sh
for f in *
do
convert $f -type Grayscale "$f"
done
@antonioalmeida
antonioalmeida / init.lua
Last active Dec 15, 2016
My Hammerspoon's config file
View init.lua
-- 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 / bissection.cpp
Last active Oct 4, 2016
Quick bissection implementation
View bissection.cpp
//============================================================================
// Name : bissection.cpp
// Author : theantonioalmeida
// Description : Quick bissection implementation
//============================================================================
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
@antonioalmeida
antonioalmeida / squareimages.sh
Created Jul 27, 2016
Squares all images in a directory (Requires ImageMagick)
View squareimages.sh
for f in *.png
do
convert $f \
\( +clone -rotate 90 +clone -mosaic +level-colors white \) \
+swap -gravity center -composite "square $f"
done
You can’t perform that action at this time.