Skip to content

Instantly share code, notes, and snippets.

View altbdoor's full-sized avatar
🐵

Ng Han Seng altbdoor

🐵
  • Kuala Lumpur, Malaysia
  • 18:55 (UTC +08:00)
View GitHub Profile
@altbdoor
altbdoor / setup_wkhtmltopdf.sh
Last active July 24, 2018 07:09
Setup wkhtmltopdf stuff
# install virtual frame buffer and wkhtmltopdf dep
sudo apt install xvfb libxrender1
# lets make a home for the stuff
mkdir ~/wkhtmltopdf
cd ~/wkhtmltopdf
# get wkhtmltopdf
curl -OL 'https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz'
tar xJf wkhtmltox-*
@altbdoor
altbdoor / ahk-filetime.ahk
Created March 24, 2018 10:19
Inspect and modify modify, creation, accessed date time info for files
; compiled exe uploaded at
; https://my.mixtape.moe/goitkl.zip
#NoEnv
#NoTrayIcon
#SingleInstance force
SetWorkingDir %A_ScriptDir%
GUI:
SansSerifFont := "Segoe UI"
@altbdoor
altbdoor / audiosurf_launcher.ahk
Created January 14, 2018 02:54
Runs a windowed Audiosurf with the proper resolution based on config.ini
#NoEnv
#NoTrayIcon
#SingleInstance force
SetWorkingDir, %A_ScriptDir%
If (FileExist("Audiosurf.exe") && FileExist("config.ini")) {
ScreenWidth := 800
ScreenHeight := 480
@altbdoor
altbdoor / ahk-hs-bonemod-clean.ahk
Created July 6, 2017 06:48
Cleans orphan bonemod files in chara folder
#NoEnv
#NoTrayIcon
#SingleInstance force
SetWorkingDir %A_ScriptDir%
GUI:
Gui, Font, s10, Arial
Gui, Add, Text, x10 y10, Game Folder (Please select HoneySelect_64.exe):
Gui, Add, Edit, w300 h25 x10 yp+20 vGameFolder, C:\illusion\HoneySelect
@altbdoor
altbdoor / ahk_png2jpg.ahk
Last active May 22, 2017 10:21
Converts PNG to JPG with png2jpeg.exe
#NoEnv
#NoTrayIcon
#SingleInstance force
SetWorkingDir %A_ScriptDir%
FileInstall, png2jpeg.exe, %A_Temp%\png2jpeg.exe, 0
; to compile this script, you will need to get png2jpeg.exe first
; https://sourceforge.net/projects/png2jpeg/
@altbdoor
altbdoor / imageset.bat
Created March 3, 2017 10:49
Compiles all PNG images in folder into a JPG image set
@echo off
:: set path to the graphicsmagick folder, get gm from
:: https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binaries/
set graphicsmagick_path=C:\Program Files (x86)\GraphicsMagick-1.3.25-Q8\
:: the maximum width of the image set
set image_set_width=1200
:: the resize filter, please check
@altbdoor
altbdoor / stuff.sh
Last active November 19, 2020 07:39
Bash scriptlets
# path adjust
CURRENT_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )"
cd "$CURRENT_DIR"
# compress all png to jpg with graphicsmagick
for i in *.png; do gm convert "$i" -quality 95 -strip "${i%.*}.jpg"; done
# or alternatively there's png2jpeg for windows
# https://sourceforge.net/projects/png2jpeg/
for i in *.png; do png2jpeg -q 95 -outfile "${i%.*}.jpg" "$i"; done
@altbdoor
altbdoor / paladin.xml
Last active August 26, 2018 08:50
Hammerwatch Character Upgrades XML
<string>combo</string>
<string>combo-heal-1</string>
<string>combo-heal-2</string>
<string>combo-heal-3</string>
<string>combo-heal-4</string>
<string>combo-heal-5</string>
<string>combo-nova-1</string>
<string>combo-nova-2</string>
<string>combo-nova-3</string>
<string>combo-nova-4</string>
@echo off
set "sevenz_path=C:\Program Files\7-Zip\7z.exe"
set temp_file=%temp%\7zl_output.txt
set is_found_compressed_line=0
set is_found_file_line=0
set garbage_count=
"%sevenz_path%" l "%~1" > "%temp_file%"
@altbdoor
altbdoor / img_to_html_css_pixels.html
Created November 9, 2016 10:03
This kills the Firefox
<!doctype html>
<html>
<head>
<style>
/* default css */
#output {box-shadow:0 0 5px red; position:relative}
.output-block {width:1px; height:1px; position:absolute}
</style>
<style id="stylesheet"></style>
</head>