Skip to content

Instantly share code, notes, and snippets.

@Danik
Danik / map_file_rename.py
Last active Sep 8, 2019
Script to batch rename/copy sequentially named files to names given in an array
View map_file_rename.py
# 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 Apr 28, 2020
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.
View UnityTweakGUI.cs
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 Aug 3, 2020
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.
View capslock_remap_alt.ahk
; 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 Jun 18, 2013
Sublime Text 2 "Open With" context menu for files and folders in Windows.
View Sublime context menu.reg
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
You can’t perform that action at this time.