Skip to content

Instantly share code, notes, and snippets.

View willnode's full-sized avatar

Wildan M willnode

View GitHub Profile
@willnode
willnode / oggstomp3.bat
Created March 16, 2018 05:48
RIP Ogg files in a folder to single mp3 using FFMPEG. (Caveat: check for single quotes in any file or concatting won't work)
for %%* in (.) do set CurrDirName=%%~nx*
for %%v in (*.ogg) do ffmpeg -loglevel panic -i ^"%%v^" -vn -ar 44100 -ac 2 -ab 192k -f mp3 ^"%%~nv.mp3^"
for %%v in (*.mp3) do echo file ^'%%v^'>>list.txt
ffmpeg -safe 0 -f concat -i list.txt -c copy "%CurrDirName%.mp3"
@willnode
willnode / MINECRAFT
Created March 17, 2018 04:11
MINECRAFT ART
+ + +++
^^^^^^^^^ +----
*********** ^ ^^^^^^^^^ +++ ^^^^^^^^^
******* ************* ^^ ^^^^^^^ ------------| ^^^^^^^^^^^^^^
*********** *********** ^^^^^^^^^^^^^^^ ---******||
c=document.body;
_='b=[85,1,-1],d=Array(1,0,4, onpoimov(>{dd=>d%2),90+e.x= e-12}),setIval(()=>{a 1])%,f* 2])*f+a,(<=a||!a 1!f 2|<f !(=||( 0einnerText(d,e)=>e%?d:"\\n"+d))},;10 0] e].fill(=d.map(]*=-1)|( (||3,c. d[ b[ )&&/|0,0)]=e=nter=(+';for(Y in $=' ')with(_.split($[Y]))_=join(pop());eval(_)
@willnode
willnode / FFMPEG_Utils.bat
Created April 22, 2018 21:55
Useful FFMPEG converters in batch
:: for mp4 the recommended video and audio codec is h264 and aac. You may opt out that though.
:: if you really want to save this as batch, replace % with %%.
:: convert *.avi to *.mp4
ffmpeg -i "%f" "%~nf.mp4" -acodec aac -vcodec h264
:: convert all *.avi to *.mp4
for %f in (*.avi) do (ffmpeg -i "%f" "%~nf.mp4" -acodec aac -vcodec h264)
:: merge all *.avi to single *.mp4
@willnode
willnode / vertex_breakdown.py
Created June 2, 2018 06:36
Blender vertex statistics breakdown script
import bpy
scene = bpy.context.scene
objs = [obj for obj in scene.objects if hasattr(obj.data, 'vertices')]
objs.sort(key=lambda x: len(x.data.vertices), reverse=True)
print("Enumerating...\t verts\t edges\t faces")
for m in objs:
@willnode
willnode / normalize-lf.bat
Last active June 30, 2018 02:41
Normalize Line Ending in 1..2..3 (normalize == Platform Dependant) (normalize-lf == Force LF)
@echo off
REM DO NOT USE THIS INSIDE THE FOLDER WHICH ALREADY HAS .GIT REPO
IF EXIST .git (
echo THERE'S A .GIT FOLDER!!! Aborting.
) ELSE (
git init
echo * text=auto eol=lf>.gitattributes
git add -A
git commit -m "Init the Dummy"
@willnode
willnode / gemastik_comp.md
Created October 5, 2018 11:34
Pemanasan Competitive Programming - Gemastik 11

1. Urutan Aneh

Deskripsi

Buatlah program yang melakukan pengurutan N (2≤N≤1000) buah bilangan seperti pada contoh kasus di bawah ini.

Format Masukan

  • Baris pertama berisi satu buah bilangan N.
  • Baris kedua berisi N buah bilangan bulat Xi.
  • Setiap bilangan dipastikan hanya antara 0-100.
@willnode
willnode / gemastik-0.md
Last active May 11, 2024 16:55
Soal Penyisihan Competitive Programming - Gemastik 11

1. Urutan Aneh

Deskripsi

Buatlah program yang melakukan pengurutan N (2≤N≤1000) buah bilangan seperti pada contoh kasus di bawah ini.

Format Masukan

  • Baris pertama berisi satu buah bilangan N.
@willnode
willnode / hology_comb.md
Last active November 14, 2018 03:56
Hology CP 2018

Soal 2

Description

Di sebuah perusahaan bernama Coconut.Inc, seorang pekerja dimintai bossnya untuk menciptakan sebuah aplikasi generator key yang dapat merahasiakan pesan yang akan disampaikan. Bantu dia untuk menyelesaikan pekerjaannya!

Input Format

Baris pertama merupakan input user yang berisikan dictonary (key dan value) dari secret key yang akan digenerate.

Baris kedua merupakan inputan user yang berisikan kalimat yang akan dijadikan pesan rahasia.

// Place your settings in this file to overwrite the default settings
{
"files.exclude": {
"**/*.meta": true,
"**/Dump": true,
"**/bin": true,
"**/obj": true,
"**/~$*": true,
"**/.vs": true,
"**/_site/": true,