Skip to content

Instantly share code, notes, and snippets.

João Vilaça vilaca

Block or report user

Report or block vilaca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vilaca
vilaca / index.html
Created Oct 3, 2019
Lisbon tech map
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Map of Lisbon based software development companies and startups.">
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
<style>
#map {
@vilaca
vilaca / index.html
Created Sep 26, 2019
Google maps full background
View index.html
<html>
<head>
<style>
#map_canvas {
width: 100%;
height: 100vh;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
@vilaca
vilaca / gist:5535b94842f451ff7ce85200614701e9
Created Sep 3, 2019
FFMPEG - generate video and sound
View gist:5535b94842f451ff7ce85200614701e9
ffmpeg -f lavfi -i color=white:s=1920x1080:r=1 -preset ultrafast -t 60 -vf " drawtext=text='You will':enable='between(t,0,60)':fontcolor=red:fontsize=124:x=10:y=20, drawtext=text='You will hear a':enable='between(t,5,60)':fontcolor=red:fontsize=124:x=10:y=20, drawtext=text='You will hear a reverse':enable='between(t,10,60)':fontcolor=red:fontsize=124:x=10:y=20, drawtext=text='You will hear a reverse cymbal':enable='between(t,15,60)':fontcolor=blue:fontsize=124:x=10:y=20, drawtext=text='In 5 secs...':enable='between(t,25,60)':fontcolor=cyan:fontsize=124:x=(w-tw)/2:y=220" clip.mp4
ffmpeg -y -i clip.mp4 -itsoffset 00:00:30 -i cymb.mp3 -map 0:0 -map 1:0 -c:v copy -preset ultrafast -async 1 clipWsound.mp4
View gist:053dcf5f28b60442aa5f5628cf8f411b
#ffmpeg -f lavfi -i color=white:s=1920x1080:r=1 -preset ultrafast -t 60 -vf "drawtext=text='Full HD (1920x1080)':enable='between(t,0,20)':fontcolor=red:fontsize=124:x=(w-tw)/2:y=20, drawtext=text='Full HD (1920x1080)':enable='between(t,5,25)':fontcolor=blue:fontsize=124:x=(w-tw)/2:y=200, drawtext=text='Full HD (1920x1080)':enable='between(t,10,30)':fontcolor=green:fontsize=124:x=(w-tw)/2:y=380, drawtext=text='Full HD (1920x1080)':enable='between(t,15,35)':fontcolor=yellow:fontsize=124:x=(w-tw)/2:y=560, drawtext=text='Full HD (1920x1080)':enable='between(t,20,40)':fontcolor=pink:fontsize=124:x=(w-tw)/2:y=740, drawtext=text='Full HD (1920x1080)':enable='between(t,25,45)':fontcolor=cyan:fontsize=124:x=(w-tw)/2:y=920" _.mp4
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-
View gist:1eea771a356acd23a632ba630bfe92cf
# ffmpeg -f lavfi -i color=black:s=7680x4320:r=120 -preset ultrafast -t 60 8k120fps.mp4
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --en
View activity.py
import praw
import json
import time
from datetime import datetime
users = set()
bot = praw.Reddit(user_agent='',
client_id='Iq6Y7YogHPtmbA',
client_secret='',
@vilaca
vilaca / setup.sh
Last active Jul 14, 2019
docker ce and docker-compose install in centos7-64b
View setup.sh
yum -y update
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install yum-utils device-mapper-persistent-data lvm2 docker-ce
systemctl start docker
systemctl enable docker
yum -y install epel-release
yum -y install python-pip
pip install docker-compose
# pip install --upgrade pip
yum -y install wget unzip git
View gist:e40d4a2c3b2122a04969c7f645dc16b5
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce
sudo usermod -aG docker $(whoami)
sudo systemctl enable docker.service
sudo systemctl start docker.service
sudo yum install epel-release
sudo yum install -y python-pip
sudo pip install docker-compose
pip install --upgrade pip
View autocomplete-hack.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Autocomplete - functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
View 4-step-sequencer
#include "Volume3.h"
#define speakerPin 9
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
You can’t perform that action at this time.