Skip to content

Instantly share code, notes, and snippets.

Good reference:
https://gist.github.com/miguelfrde/5dde43aa08b076106b9e
http://tech.memoryimprintstudio.com/dual-boot-installation-of-arch-linux-with-preinstalled-windows-10-with-encryption/
https://wiki.archlinux.org/index.php/GRUB#Windows_installed_in_UEFI-GPT_Mode_menu_entry
http://valleycat.org/linux/arch-usb.html?i=1
#boot live usb or cd
fdisk -l (find your drive names)
lsblk
cfdisk /dev/sda (assuming sda is your HDD)
@shinchiro
shinchiro / patch.bat
Last active May 29, 2020 22:13
Creating xdelta patch easy way.
@echo OFF
:: How to use:
:: 1. Put xdelta3.exe in C:\
:: 2. Put old_file and new_file in any folder but must in same directory
:: 3. run with cmd: patch.bat old_file.mkv new_file.mkv mypatch
:: 4. patch now in 'xdelta' folder
set xdelta3="C:\xdelta3.exe"
set patch_dir=%~dp1\xdelta
call :Createxdelta %1 %2 %3
@shinchiro
shinchiro / encode.bat
Last active May 17, 2024 16:54
My one-drag encode using CLI
@echo OFF
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Copyright (C) 2017-2019 miniencodes.nl :::
:: :::
:: Author: Shinchiro :::
:: :::
:: Purpose: To re-encode anime to small size with little effort, without GUI. :::
:: WARNING: DON'T PUT THIS SCRIPT IN SAME FOLDER AS INPUT FILE, IT WILL OVERWRITE THE INPUT FILE. :::
:: The lock file is needed to force only one encoding at same
@shinchiro
shinchiro / make_x265.sh
Last active April 6, 2020 18:02
Script for building x265
#!/bin/sh
# This script will be put outside of x265's repo folder, side by side.
# Clone x265 repo first before running this script: hg clone https://bitbucket.org/multicoreware/x265
# Tell our build toolchain folder.
# If built with MSYS2, there's no need for this. Also '-DCMAKE_TOOLCHAIN_FILE' command should be removed.
export PATH="/home/shinchiro/build/build64/install/bin:$PATH"
export CXXFLAGS='-march=znver1'
@shinchiro
shinchiro / clean.sh
Created August 28, 2016 02:32
Some random shit
#!/bin/sh
shopt -s extglob
# rm CMakeFiles/*
# rm common/*
# rm encoder/*
SCRIPT_DIR_PATH=$(dirname `which $0`)
cd $SCRIPT_DIR_PATH
cd ../x265/build/msys
rm -R ./*/
From e609a32347ad40cab781c24c039e3704d141e3e7 Mon Sep 17 00:00:00 2001
From: shinchiro <shinchiro@users.noreply.github.com>
Date: Fri, 16 Sep 2016 07:43:36 +0800
Subject: [PATCH] Add makefile and pkgconfig file
Custom Makefile originally made by rossy & RiCON
---
Makefile | 444 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
libEGL.pc.in | 10 ++
2 files changed, 454 insertions(+)
@shinchiro
shinchiro / Google Spreadsheet scripts.js
Last active December 2, 2016 21:05
Google Spreadsheet scripts
// Reference: http://webapps.stackexchange.com/a/31942
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
if( s.getName() == "Data" ) { //checks that we're on the correct sheet
var r = s.getActiveCell();
var last = s.getLastColumn() - r.getColumn();
var nextCell = r.offset(0, last);
var time = new Date();
time = Utilities.formatDate(time, "GMT", "dd-MM-yyyy");
nextCell.setValue(time);
@shinchiro
shinchiro / packages.txt
Last active December 22, 2022 04:39
Missing Cygwin/MSYS2 packages
1. Install re2c
git clone --depth 1 https://github.com/skvadrik/re2c.git
./autogen.sh
./configure --prefix=/usr
make && make install
2. Install ninja
git clone --depth 1 https://github.com/ninja-build/ninja.git
./configure.py --bootstrap
mv ninja.exe /usr/bin
@shinchiro
shinchiro / HardsubWithFFmpeg.txt
Created December 14, 2016 04:03
How to hardsub subtitle with FFmpeg
::
:: This demonstrate on how to hardsub embeded subtitle and downscale video to 360p with only FFmpeg. Ensure FFmpeg is compiled with --enable-libass
ffmpeg -hide_banner -i "D:\oh\test\input.mkv" -vf "subtitles='D\:\\oh\\test\\input.mkv'",scale=-1:360:flags=spline -c:v libx264 -preset ultrafast output.mp4
::Character ':', '\' need to be escaped if present in input's path
:: Escape both characters with sed.
echo "D\:\\oh\\test\\input.mkv" | sed "s,\\,\\\\,g;s,:,\\:,g" >>name
set /p modified=< name
@shinchiro
shinchiro / FFmpegMapping.txt
Created December 19, 2016 06:32
FFmpeg mapping tricks
# Mapping can also be know selecting in ffmpeg.
# http://stackoverflow.com/a/12943003
1. Select only video and audio from mkv .Mux into mp4
ffmpeg -i input.mkv -map 0:v -map 0:a -c copy test.mp4