Skip to content

Instantly share code, notes, and snippets.

View Dinir's full-sized avatar
🙍
Failed.

Dinir Nertan Dinir

🙍
Failed.
View GitHub Profile
@Dinir
Dinir / FL Studio Shortcuts and Script 1.1 2.json
Last active May 6, 2026 05:37
Use various controls within pressing and rotating on Intech Grid EN16. (with a corresponding Grid Editor configuration)
{
"id": "11568283-e2dd-455d-b867-301ae04334f3",
"modifiedAt": "2026-05-06T05:34:02.399Z",
"createdAt": "2026-05-05T04:26:13.829Z",
"name": "FL Studio Shortcuts and Script 2.0",
"description": "To be used with the script: https://gist.github.com/Dinir/c4fba7f2844de6f6fb18e48ae818af35\n\nEncoders with CC from 20\\~35 and buttons assigned to FL Studio features. The CC range doesn't overlap with Novation Launchkey default knobs assignment.\n| Playlist | Channel Rack | Piano Roll | Mixer |\n| - | - | - | - |\n| Clone Pattern* | Step Edit Toggle* | Strum* ** | Undo/Redo* |\n| Quick Quantize** | Scale Levels** | Articulate** | Metronome |\n| Pat/Song | Start/Pause | Stop | Recording |\n\n\\* the controls include rotation: \n Pattern Jog, Step Edit Jog, Marker Jog, Undo Jog\n\\*\\* sends a keyboard shortcut\n\nUnfortunately the alternative states won't be synced when the keyboard/mouse changes the corresponding controls.",
"type": "EN16",
"version": {
"major": "1",
"min
@Dinir
Dinir / _media.scss
Created February 16, 2026 03:39
responsive mixins
$width-400: 375px; // small phones
$width-600: 576px; // large phones
$width-800: 768px; // tablets
$width-1000: 1024px; // small laptops / tablets landscape
$width-1200: 1280px; // desktops
$width-1600: 1536px; // large desktops
@mixin to-width($size) {
@media screen and (max-width: $size - 1) {
@content;
@Dinir
Dinir / PlayerController.cs
Last active August 28, 2025 04:30
A Template to use with Input System Package in Unity Engine
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerController : MonoBehaviour
{
/*
* mov: stores movement data and related logic
* dir: stores direction data and related logic
* pos: (UI Map) stores mouse/pointer position data and related logic
* vel: stores vertical velocity value for gravity
@Dinir
Dinir / user_defined_plugin_mappings.py
Last active May 6, 2026 01:44
My Launchkey Plugin Mode Mappings for FL Studio - Goes to `%UserProfile%\Documents\Image-Line\FL Studio\Settings\Hardware\Novation\user\`.
user_defined_plugin_mappings = {
"plugin_mappings": [
{
"plugin_name": "3x Osc",
"parameters": [
{"parameter_index": 2, "name": "Osc 1 coarse pitch"},
{"parameter_index": 9, "name": "Osc 2 coarse pitch"},
{"parameter_index": 16, "name": "Osc 3 coarse pitch"},
{"parameter_index": 6, "name": "Osc 2 mix level"},
{"parameter_index": 13, "name": "Osc 3 mix level"},
@Dinir
Dinir / device_Rel2Abs.py
Last active December 24, 2024 09:57
FL Studio can't process endless encoders. Here's a fallback making them into absolute encoders.
# name=Relative Value to Absolute Value
# Thanks to NFX (https://forum.image-line.com/viewtopic.php?t=329048#p1973274)
# and RoadCrewWorker (https://forum.image-line.com/viewtopic.php?t=328886#p1973550)
import device
import mixer
import midi
import ui
from fl_classes import FlMidiMsg
@Dinir
Dinir / Double CC EN16 (Relative) 1.json
Last active October 23, 2024 01:33
2CC for each encoder, arranged for 90° Rotation.
{
"id": "c48454ff-b623-4460-a9eb-047a986304f0",
"modifiedAt": "2024-10-22T14:21:04.241Z",
"createdAt": "2024-10-20T09:13:08.235Z",
"name": "Double CC EN16 (Relative)",
"description": "CC numbers are assigned from `ccs` to 15 consecutive numbers. CC when pushed are assigned from `ccs+ccsh`. Numbers are by default aligned for 90° rotation. To change this, change `function er(eln)` in the System Setup Event.\n - for 0°, put `num+ccs`.\n - for 270°, change it to `(-4*(num+1))%17-1+ccs`.\n\nChange `cln`, `cld`, `clx`, and `clg` to apply different color. `cln` is for neutral, `cld` and `clx` are for turning left and right, `clg` is for button push.\n\nButton color by default is set to grey, so it doesn't affect encoder color and when pressed it just makes the color a bit brighter.",
"type": "EN16",
"version": {
"major": "1",
"minor": "3",
@Dinir
Dinir / FuelEconomyConversion.txt
Last active February 18, 2023 05:47
for Google Sheets
=if(unit_index=unit_display_index,
fe_value,
if(unit_index=1,
let(
fe_value_in_kpl, 100/fe_value,
if(unit_display_index=2,
fe_value_in_kpl*KPLinMPGus,
if(unit_display_index=3,
fe_value_in_kpl*KPLinMPGi,
fe_value_in_kpl
@Dinir
Dinir / getWordsOfJSON.js
Created January 16, 2023 09:35
Extract values from JSON, so it can be used to get the wordcount.
const getWordsOfJSONObj = obj => {
let valueText = ''
for (key in obj) {
if (typeof obj[key] === 'object') {
valueText += getWordsOfJSONObj(obj[key])
} else {
valueText += obj[key] + '\n'
}
}
return valueText
@Dinir
Dinir / narrow-speller-cs-pusan.css
Last active January 11, 2023 10:38
Make the layout of the only reliable Korean spell checker suitable for a narrow and long area.
:root {
--margin: 7px;
--textarea-width: 85%;
}
body {
margin: 0;
overflow-x: hidden;
}
#framePopup {
@Dinir
Dinir / naver-enkr.groovy
Last active January 12, 2023 10:57
OmegaT Browser plugin scripts for English-Korean translation works.
import org.omegat.core.Core
import org.omegat.core.CoreEvents
import org.omegat.core.events.IEditorEventListener
import org.omegat.gui.editor.IPopupMenuConstructor
import org.omegat.gui.editor.SegmentBuilder
import org.omegat.gui.main.MainWindow
import javax.swing.AbstractAction
import javax.swing.Action
import javax.swing.JComponent