Skip to content

Instantly share code, notes, and snippets.

View lingxiaoyang's full-sized avatar

Ling X. Yang lingxiaoyang

View GitHub Profile
@lingxiaoyang
lingxiaoyang / mov2gif.sh
Last active January 6, 2020 20:01
Mac Screen Recording Transcoding Utilities
#!/bin/sh
set -e
OUTPUT=$(basename "$1" .mov)
OUTPUT=$OUTPUT.gif
palette="/tmp/palette.png"
filters="fps=10"
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$OUTPUT"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1="\u@\h:\w$ "
export EDITOR="emacs"
docker-compose stop
docker-compose rm -f
docker-compose pull
docker-compose up -d
@lingxiaoyang
lingxiaoyang / scotia.py
Created August 2, 2019 19:19
Read scotiabank (Canada) statement into csv.
"""
Read scotiabank (Canada) statement into csv.
1. Concatenate all your statement files into a single PDF.
2. Use Foxit online PDF tool (14-day free trial) to convert the PDF file into XLSX file.
3. Rename the XLSX file as scotia.xlsx, run this script, and output will be written to scotia.csv
"""
import csv
from openpyxl import load_workbook