Skip to content

Instantly share code, notes, and snippets.

View rnazali's full-sized avatar
🏡
Working remotely from my okayest hometown

Rahmat Nazali Salimi rnazali

🏡
Working remotely from my okayest hometown
View GitHub Profile
@Kirill89
Kirill89 / SlayTheSpire-json-to-save.js
Created August 19, 2020 17:07
Slay The Spire save edit
const fs = require('fs');
let data = fs.readFileSync('IRONCLAD.autosave.json', 'utf8');
const out = [];
for (let i = 0; i < data.length; i++) {
const key = 'key';
out.push(data.charCodeAt(i) ^ key.charCodeAt(i % key.length));
}
@martinsvoboda
martinsvoboda / nospaces.py
Last active August 11, 2025 03:06
Django template custom tag nospace - Removes whitespace inside tags and text
import re
from django.utils.encoding import force_text
from django.template import Library, Node
register = Library()
def strip_spaces_in_tags(value):
@W4RH4WK
W4RH4WK / FSM.cs
Last active August 15, 2025 19:18
C# Generic Finite State Machine
using System;
using System.Collections.Generic;
using System.Reflection;
namespace GenericFSM {
public class FSM<T> where T : struct, IConvertible {
public T State { get; private set; }
# http://python.web.id/angka-terbilang-pada-python/#.VQpS8s2sXQo
satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh',
'delapan', 'sembilan', 'sepuluh', 'sebelas']
def terbilang_(n):
n = int(n)
if n >= 0 and n <= 11:
hasil = [satuan[n]]
elif n >= 12 and n <= 19:
@plentz
plentz / nginx.conf
Last active November 27, 2025 12:39
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048