Skip to content

Instantly share code, notes, and snippets.

sqlite3 .kobo/KoboReader.sqlite
sqlite> INSERT INTO user (UserID,UserKey,Subscription) VALUES('2','1','1');
sqlite> .exit
@caio2k
caio2k / debian12-automate-post-install.sh
Last active July 17, 2023 13:21
Install desktop utilities for debian 12 bookworm
echo 'Scripts for debian12 post-install'
@caio2k
caio2k / stab-norm-video.sh
Last active September 7, 2021 19:15
stabilize and normalize video
#!/bin/bash
function video_edit(){
rm -f transforms.trf
ffmpeg -i "${1}" -vf vidstabdetect=shakiness=5 -f null -
case "$1" in
*.MTS) VCODEC="-vcodec libx264" ;;
*) VCODEC= ;;
esac
@caio2k
caio2k / 0-self-publishing.md
Created July 25, 2021 15:16 — forked from caseywatts/0-self-publishing.md
Self-Publishing via Markdown
@caio2k
caio2k / debian11-automate-post-install.sh
Last active October 1, 2022 09:58
Install desktop utilities for debian 11 bullseye
echo 'Scripts for debian11 post-install'
@caio2k
caio2k / debian10.sh
Last active November 22, 2020 21:28
green background camera
#!/bin/bash
#by caio2k
#tested on debian10
#based on https://del.igh.tf/ul/bodypix-and-obs/
#install obs-studio and dependencies to compile v4l2 output plugin
sudo apt install obs-studio v4l2loopback-dkms cmake libobs-dev qtbase5-dev
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git
cd obs-v4l2sink/ && mkdir build && cd build
@caio2k
caio2k / git
Last active April 11, 2020 22:21
linux cheat sheet
#rebase from upstream
#first add the upstream refer into .git/config
#[remote "upstream"]
git rebase upstream/master
#remove last commmit
git reset --hard HEAD^
#!/bin/bash
ls -1 *JPG > /tmp/files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o /tmp/test.avi -mf type=jpeg:fps=15 mf://@/tmp/files.txt
ffmpeg -r 15 -pattern_type glob -i '*.JPG' -vcodec libx264 -vf scale=-1:1080 output.mp4
@caio2k
caio2k / debian10_pro.sh
Last active March 2, 2020 20:53
Debian10: install additional packages
#!/bin/bash
#designed for debian10
#to be launch by the own user
#first you need to give him sudo permission and restart session
#apt install sudo
#usermod -a -G vagrant sudo
sudo apt install -y apt-transport-https curl sudo
#add slack repo
@caio2k
caio2k / vbox6 in bionic
Last active March 6, 2019 14:51
vagrantbox improvements
+ add 5GB more in the vm
d-i pkgsel/include string openssh-server nfs-common ntpdate ntp vim ansible build-essential apt-transport-https curl snapd docker-compose virtualbox-guest-x11 git vanilla-gnome-desktop linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
cat /etc/apt/sources.list.d/disco.list
deb http://ubuntu.cica.es/ubuntu/ disco main restricted universe multiverse
cat /etc/apt/preferences.d/disco.pref