Skip to content

Instantly share code, notes, and snippets.

View antonioalmeida's full-sized avatar
🍺
Procastinating

António Almeida antonioalmeida

🍺
Procastinating
View GitHub Profile
CREATE TABLE users...;
CREATE TABLE ...
--1. What are the names of countries with population greater than 8 million?
SELECT Name
FROM country
WHERE Population > 8000000;
--2. What are the names of countries that have “land” in their names?
SELECT ..............
--3. What are the names of the cities with population in between 500,000 and 1 million?
SELECT ...
@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
@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 / 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 / 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