Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Danik
Danik / map_file_rename.py
Last active September 8, 2019 10:50
Script to batch rename/copy sequentially named files to names given in an array
# Python 3
import os
import shutil
# Rename files named for example 'tile_0.png', 'tile_1.png'... in orig_files_folder
# to the names given in the des_tile_names array (based on their index in the array)
file_ext = ".png"
@Danik
Danik / UnityTweakGUI.cs
Last active August 6, 2021 14:03
A simple in-game parameter tweaking script for Unity. It finds all fields and properties marked with [TweakableMember] in MonoBehaviours in a scene, and enables tweaking in a GUI from inside the game, which can be useful on tablets etc, where there is no access to the inspector.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
///<summary>
/// A simple in-game GUI for Unity that allows tweaking of script fields
/// and properties marked with [TweakableMember]
///</summary>
@Danik
Danik / capslock_remap_alt.ahk
Last active April 15, 2024 11:34
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
@Danik
Danik / Sublime context menu.reg
Created June 18, 2013 19:05
Sublime Text 2 "Open With" context menu for files and folders in Windows.
Windows Registry Editor Version 5.00
; Sublime context menu.reg
; Sublime Text 2 "Open With" context menu for files and folders.
; Also assigns the icon to the menu item.
; By Danik
;
; IMPORTANT:
; You need to replace all the paths to sublime_text.exe if it's
; installed in a different location than