Skip to content

Instantly share code, notes, and snippets.

View vitalfadeev's full-sized avatar

Vital Fadeev vitalfadeev

  • Russia
View GitHub Profile
ciadpi-x86_64 --tlsrec 3+s --auto=torst --timeout 3
@vitalfadeev
vitalfadeev / to-github.sh
Last active November 8, 2023 06:48
Create new repo on github.com from local folder and upload.
#!/bin/sh
# gh auth login
git init
git add -A .
git commit -m "First commit"
NAME=`basename $PWD`
gh repo create "${NAME}" --source=. --public --push
@vitalfadeev
vitalfadeev / Makefile
Last active November 15, 2022 10:07
Create disk image with GRUB2 installd
# Create disk image with GRUB2 installd
# Requires: grub-install rm mkdir dd parted kpartx mkfs.vfat mkfs.ext2 cp mount umount chown
# Source tree:
# img/
# ext2 fat16 fat32
FS=ext2
#
DISK_FILE=disk.img
DISK_SIZE=20
BUILD_FOLDER=.build
#!/bin/sh
# clear system journal (gnome journald)
sudo journalctl --rotate
sudo journalctl --vacuum-size=100M
sudo journalctl --vacuum-time=1s
sudo systemctl restart systemd-journald
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
done
#!/bin/bash
# Remove start into from video.
# Remove end titres from video.
[ -e splitted ] || mkdir trimed
for f in *.mp4
do
echo $f
ffmpeg \
@vitalfadeev
vitalfadeev / TrueType.ts
Created September 14, 2020 11:28 — forked from smhanov/OpenType.ts
Here is my implementation of a TrueType font reader in Typescript. You can read a font directly from an ArrayBuffer, and then call drawText() to draw it. See my article http://stevehanov.ca/blog/index.php?id=143
// By Steve Hanov
// [email protected]
// Released to the public domain on April 18, 2020
//import { log } from "./log"
// Usage:
/*
declare let arrayBuffer:ArrayBuffer;
@vitalfadeev
vitalfadeev / build-tensorflow-for-current-cpu-without-cuda.sh
Last active November 30, 2019 13:41
Here building Tensorflow 1.14. No CUDA, for current CPU (noAVX on my PC)
#!/bin/bash
# Here building Tensorflow.
# - will be created Virtual environment
# - will be downloaded TensorFlow 1.14
# - will be downloaded Bazel 0.26.0
# - will be installed Bazel
# - will be compilled TensorFlow to pip package
# - will be installed pip package into the Virtual environment
##############################################################################
@vitalfadeev
vitalfadeev / functionList.xml
Created January 18, 2019 15:12
D lang functionList
<association id= "d_function" langID="52" />
<!-- ======================================================================== -->
<!-- =========================================================== [ D ] -->
<parser
displayName="D"
id ="d_function"