Skip to content

Instantly share code, notes, and snippets.

View aldoridhoni's full-sized avatar

Aldo Ridhoni aldoridhoni

View GitHub Profile
@aldoridhoni
aldoridhoni / org-babel-tangle
Created May 18, 2019 12:55
Improve org-babel-tangle
#!/usr/bin/env python3
# -*- mode: python -**
import fileinput, os
dests = dict()
"""A dictionary associating absolute file names and file objects."""
counter = dict()
"""A dictionary associating file objects with count of emitted
@aldoridhoni
aldoridhoni / convert.sh
Created May 25, 2019 14:41
divx pioneer
#!/bin/bash
for input in "$@"; do
output="${input%%.*}.avi"
# does not work if filename has multiple dot
ffmpeg -i "$input" -c:v mpeg4 -vtag DIVX -s 640x480 -qscale:v 10 -c:a libmp3lame -qscale:a 0 "$output"
done
@aldoridhoni
aldoridhoni / andromax.m3y
Last active February 9, 2021 14:28
URLs Andromax M3Y
andromax.m3y/mark_home.w.xml
andromax.m3y/mark_title.w.xml
andromax.m3y/mark_set_ip.w.xml
andromax.m3y/mark_set_basic.w.xml
andromax.m3y/mark_conn.w.xml
andromax.m3y/mark_engineer.w.xml
andromax.m3y/rand.w.xml
andromax.m3y/read_imei.w.xml
andromax.m3y/open_diag.w.xml
andromax.m3y/close_diag.w.xml
@aldoridhoni
aldoridhoni / batch_dl.sh
Last active September 13, 2022 20:05
Batch Download ALOS from JAXA
#!/bin/bash
# Indonesia
for long in {090..160..5}; do
# north side
for lat in {020..000..-5}; do
file="N${lat}E${long}_N$(printf '%03d' $((10#$lat + 05)))E$(printf '%03d' $((10#$long + 05))).tar.gz"
wget -nc ftp://ftp.eorc.jaxa.jp/pub/ALOS/ext1/AW3D30/release_v1804/$file
done
@aldoridhoni
aldoridhoni / tree-bin
Last active September 30, 2022 11:08
F609 folder tree
.
├── acs_cli
├── acsd
├── ash
├── bcmlog
├── bdmf_shell
├── bobtest
├── brctl
├── bs
├── busybox
@aldoridhoni
aldoridhoni / batch_run.sh
Created April 15, 2018 16:52
Convert MOD video to mp4 and read some metadata from MOI file.
#!/bin/sh
for vid in *.MOD; do python3 convert_mod.py $vid; done