Skip to content

Instantly share code, notes, and snippets.

@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
@matthewzring
matthewzring / markdown-text-101.md
Last active April 24, 2024 18:43
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

#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
@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
@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

~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);
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active April 21, 2024 22:19
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
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName