Skip to content

Instantly share code, notes, and snippets.

@willnode
willnode / gemastik-0.md
Last active November 15, 2025 04:49
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 / 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 / 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 / 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 / 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
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 / MINECRAFT
Created March 17, 2018 04:11
MINECRAFT ART
+ + +++
^^^^^^^^^ +----
*********** ^ ^^^^^^^^^ +++ ^^^^^^^^^
******* ************* ^^ ^^^^^^^ ------------| ^^^^^^^^^^^^^^
*********** *********** ^^^^^^^^^^^^^^^ ---******||
@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 / ffmpeg-compress-mp4.bat
Last active March 10, 2022 22:45 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG (batch script for whole .mp4 in folder)
for %%v in (*.mp4) do ffmpeg -i "%%v" -vcodec h264 -b:v 800k -acodec mp3 "compress/%%v"
@willnode
willnode / HowToCleanRepo.md
Last active February 28, 2018 07:44
Repo Cleanup (trailing spaces and EOF blank line) using Notepad++

How to clean your Repo

Cleaning repo is easy as 1.2.3

Remove trailing spaces

Find: [ ]+$

Replace: (empty)