Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE android_metadata (locale TEXT);
CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,account_name TEXT NOT NULL,account_type TEXT NOT NULL,data TEXT,UNIQUE(account_name, account_type));
CREATE TABLE _sync_state_metadata (version INTEGER);
CREATE TABLE contacts (_id INTEGER PRIMARY KEY AUTOINCREMENT,name_raw_contact_id INTEGER REFERENCES raw_contacts(_id),photo_id INTEGER REFERENCES data(_id),photo_file_id INTEGER REFERENCES photo_files(_id),custom_ringtone TEXT,send_to_voicemail INTEGER NOT NULL DEFAULT 0,times_contacted INTEGER NOT NULL DEFAULT 0,last_time_contacted INTEGER,starred INTEGER NOT NULL DEFAULT 0,has_phone_number INTEGER NOT NULL DEFAULT 0,lookup TEXT,status_update_id INTEGER REFERENCES data(_id), contact_last_updated_timestamp INTEGER, pinned INTEGER NOT NULL DEFAULT 2147483647);
CREATE INDEX contacts_has_phone_index ON contacts (has_phone_number);
CREATE INDEX contacts_name_raw_contact_id_index ON contacts (name_raw_contact_id);
CREATE TABLE stream_items (_id INTEGER PRIMARY KEY AUTOI
### Speed up ×6:
ffmpeg -f concat -safe 0 -i =(for file in /mnt/ext/data/100GOPRO/GH??0012.MP4 ; do echo file $file ; done) -vf select='eq(mod(n\,25)\,0)+eq(mod(n\,25)\,6)+eq(mod(n\,25)\,12)+eq(mod(n\,25)\,18)',scale=960:540,setpts=N/24/TB,fps=24 -c:v libx264 -crf 26 -an /tmp/timelapse-combined/tl-gopro.mp4 ; done
ls /mnt/usbkey/AUKEY/Movie/2019_0915_*B.MP4 | perl -ne 'print "$1\n" if m/(2019_0915_[0-9]{6}_[0-9]{3}B\.MP4)/' > /tmp/filelist
for f in $(cat /tmp/filelist) ; do ffmpeg -i "/mnt/usbkey/AUKEY/Movie/${f}" -vf select='(eq(mod(n\,15)\,0)+eq(mod(n\,15)\,7))*lt(n\,5400)',scale=960:540,setpts=N/24/TB,fps=24 -c:v libx264 -crf 26 -an /tmp/timelapse-combined/tl-dashcam-${f%.MP4}.mp4 ; done
## I have no idea why this causes errors
# convert 'xc:gray[960x540!]' /tmp/timelapse-combined/gray.png
# ffmpeg -r 24 -f concat -safe 0 -i =(for i in $(seq 1349) ; do echo file /tmp/timelapse-combined/gray.png ; done) -c:v libx264 -an -pix_fmt yuv420p /tmp/timelapse-combined/gray.mp4
[0:v] trim=0:180 [d0] ;
[1:v] trim=0:180 [d1] ;
[2:v] trim=0:180 [d2] ;
[3:v] trim=0:180 [d3] ;
[4:v] trim=0:180 [d4] ;
[5:v] trim=0:180 [d5] ;
[6:v] trim=0:180 [d6] ;
[7:v] trim=0:180 [d7] ;
[8:v] trim=0:180 [d8] ;
[9:v] trim=0:180 [d9] ;
## See https://twitter.com/gro_tsen/status/1174651836952956930 and its thread.
## Point labeling:
## 0 is fixed at (0,0).
## 1 is fixed at (0,-2).
## 1,2,3 are collinear with distance 1 between 1,2 and 2,3, and 1 at midpoint of 1,3.
## 2,3,5,4 form a quadrilateral.
## 2,4,6 are collinear with distance 1 betewen 2,4 and 4,6, and 4 at midpoint of 2,6.
## Distance 1 between 0,6.
## 5 is the plotted point.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/ext/data/100GOPRO/GH010341.MP4':
Metadata:
major_brand : mp41
minor_version : 538120216
compatible_brands: mp41
creation_time : 2019-09-28T16:24:45.000000Z
firmware : HD6.01.02.01.00
Duration: 00:16:03.05, start: 0.000000, bitrate: 33243 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 33000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
Metadata:
## The base points for the ruler-only construction.
## (Each point represented using homogeneous coordinates normalized so that
## the first nonzero coordinate is 1.)
basepoints = [(QQ^3)((1,0,0)), (QQ^3)((0,1,0)), (QQ^3)((0,0,1)), (QQ^3)((1,1,1))]
[tmp.set_immutable() for tmp in basepoints]
## bag0 and bag alternate between points and lines: initially, bag0 contains
## no lines and bag contains the base points, and at each step we update
## by adding to bag0 everything that can be constructed by connecting two
## items of bag and we exchange the two (bag becomes the new bag0, and the
JA **|||....||||||******..........................
KA **|||....||||||************...*******..........
KF .....**********************...*******..........
KI *****....*************||||*...*******..........
KO *****....******************...*******..........
KU *****....***************||*...*******..........
LA .....*****************|*|**...|**|||******.....
LE ..............********|*|**...|**|||******.....
PA *****....**************|*|*...||*|*|*||||******
PC *****....**************|*|*...||*|*|*|||*******
## This is for Ubuntu 18.04 "Bionic Beaver":
## Install postgresql-10=10.10-0ubuntu0.18.04.1 and postgis=2.4.3+dfsg-4
## (which will install postgresql-10-postgis-2.4=2.4.3+dfsg-4 as dependency).
## DO NOT install osm2pgsql=0.94.0+ds-1 as it seems too old (will compile below).
#### Compilation of osm2pgsql ####
## Install libboost-filesystem1.65-dev andlibboost-system1.65-dev before this.
cd /data/misc
ACTION=="add", SUBSYSTEM=="net", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="9271", ENV{DMADORE_WIFI_STICK}="1", RUN+="/root/bin/wifi-stick-added-netlevel"
ACTION=="remove", SUBSYSTEM=="net", ENV{DMADORE_WIFI_STICK}=="1", RUN+="/root/bin/wifi-stick-removed-netlevel"
## Compute the Fourier coefficients of the harmonic parametrization of the
## boundary of the Mandelbrot set, using the formulae given in following paper:
## John H. Ewing & Glenn Schober, "The area of the Mandelbrot set",
## Numer. Math. 61 (1992) 59-72 (esp. formulae (7) and (9)). (Note that their
## numerical values in table 1 give the coefficients of the inverse series.)
## The coefficients ctab[m] are the b_m such that z + sum(b_m*z^-m) defines a
## biholomorphic bijection from the complement of the unit disk to the
## complement of the Mandelbrot set. The first few values are:
## [-1/2, 1/8, -1/4, 15/128, 0, -47/1024, -1/16, 987/32768, 0, -3673/262144]