db.votes.aggregate([{
$lookup: {
from: "users",
localField: "createdBy",
foreignField: "_id",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Baixa resultados do TSE desde 1989 e cria um CSV com os parlamentares eleitos com colunas: | |
# ano, uf, nome, cargo, situação, partido | |
ANOS_UF := 1989 1990 | |
ANOS_MUNZONA := 1994 1996 1998 2000 2002 2004 2006 2008 2010 2012 2014 | |
ARQUIVOS_UF := $(patsubst %, VOTACAO_CANDIDATO_UF_%.ZIP, $(ANOS_UF)) | |
ARQUIVOS_MUNZONA := $(patsubst %, votacao_candidato_munzona_%.zip, $(ANOS_MUNZONA)) | |
ARQUIVOS_MUNZONA_DEPENDENCIES := $(patsubst %, votacao_candidato_munzona_%_SP.txt, $(ANOS_MUNZONA)) | |
ARQUIVOS_UF_DEPENDENCIES := $(patsubst %, VOTACAO_CANDIDATO_UF_%, $(ANOS_UF)) |
To increase speed of a video by a factor of 1.5x:
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" output.mp4
We can use this to adjust the speed of all the videos in a directory (Linux and macOS only):
mkdir -p output