Skip to content

Instantly share code, notes, and snippets.

@ECHO OFF
REM For general infos see http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
REM Set the path here if your ffmpeg executable is somewhere else as in the current directory
SET ffmpeg_path=ffmpeg.exe
SET palette=%TMP%\palette.png
SET subtitlefile=subtitle.ass
if not exist "%ffmpeg_path%" echo "Can't find ffmpeg.exe" & goto done
@KeronCyst
KeronCyst / OSAKv3.ahk
Last active January 22, 2021 03:53
On-Screen ANSI Keyboard v3 (AutoHotkey)
; On-Screen ANSI Keyboard version 3 (original discussion at https://redd.it/kxh9rb)
; This customizable, non-interactive keyboard only flashes what you type. It may be used to:
; Memorize the ANSI keyboard format without looking down
; Record your keystrokes (like in a game or something)
; Check key functionality on a damaged keyboard
; Revel in or lament over your typing speed
; Version 3:
; /u/anonymous1184 used invisible characters (to differentiate Numpad numbers from their counterparts) and
@bpesquet
bpesquet / .gitattributes-lfs-unity
Last active December 7, 2022 22:37
.gitattributes file for LFS with Unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
@endolith
endolith / AutoCorrect.ahk
Last active January 31, 2024 14:02
AutoCorrect AutoHotkey spelling script
; c = case sensitive
; c1 = ignore the case that was typed, always use the same case for output
; * = immediate change (no need for space, period, or enter)
; ? = triggered even when the character typed immediately before it is alphanumeric
; r = raw output
;------------------------------------------------------------------------------
; CHANGELOG:
;
; 2011-03-21 and after: See readme.md
@ramons03
ramons03 / Notepad++AdvancedSearch.txt
Last active February 28, 2024 23:10
Notepad++ Advanced search and replace. Null, Enter char, Tab, Regular Expressions, Etc.
Open the find/replace dialog.
At the bottom will be some Search mode options. Select "Extended (\n \r \t \0 \x...)"
In either the Find what or the Replace with field entries, you can use the following escapes:
\n new line (LF)
\r carriage return (CR)
\t tab character
\0 null character
\xddd special character with code ddd
~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~o~ = Orange
~c~ = Grey?
~m~ = Darker Grey
~u~ = Black
~n~ = New Line
@lastguest
lastguest / jenkins_one_at_a_time_hash.php
Last active March 20, 2024 14:11
Bob Jenkins' One-At-A-Time hashing algorithm.
<?php
// Bob Jenkins' One-At-A-Time hashing algorithm.
function jenkins_hash($key) {
$key = (string)$key;
$len = strlen($key);
for($hash = $i = 0; $i < $len; ++$i) {
$hash += ord($key[$i]);
$hash += ($hash << 10);
$hash ^= ($hash >> 6);
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active April 11, 2024 22:29
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active April 27, 2024 15:39
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
#NoEnv
SetBatchLines, -1
#MaxHotkeysPerInterval 200
#Include <VA>
; Create the slider window
Gui, Add, Progress, w100 h20 x0 y0 Range0-100 vVolSlider, 0
Gui, Add, Text, w100 h20 x0 y0 vVolText BackgroundTrans Center +0x200, 0
Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Show, Hide w100 h20 x0 y0, Volume