Skip to content

Instantly share code, notes, and snippets.

View attilam's full-sized avatar

Attila Malarik attilam

View GitHub Profile
@attilam
attilam / kanata.kbd
Created November 19, 2024 21:37
My kanata config with homerow mod / navigation / programming layers
(defcfg
process-unmapped-keys yes
)
(defsrc
q w e r t y u i o p
a s d f g h j k l ;
spc `
)
(defvar
@attilam
attilam / midi-beats.py
Created September 6, 2024 19:23
Four on the Floor
# install: `pip install mido python-rtmidi`
import mido
counter = 0
step = 1
beat = 1
bar = 1
viz = "+---+---+---+---"
@attilam
attilam / rs_mat.py
Last active June 5, 2023 06:44
Houdini Shelf Tool to enable the albedo texture of Quixel Bridge RedShift materials in the OGL viewport
for node in hou.selectedNodes():
if (node.type().name() != "redshift_vopnet"): continue
ptg = node.parmTemplateGroup()
folder = ptg.findFolder("RS Mat")
if (folder): continue
node.layoutChildren()
let spn = document.getElementsByTagName('span')
let t, i, b
let res = ''
for(let s of spn) {
let a = 0
let cn = s.childNodes
while(a < cn.length) {
let node = cn[a]
switch(node.nodeName) {
const Parser = require('fast-xml-parser')
const he = require('he')
const createCsvWriter = require('csv-writer').createObjectCsvWriter
const fs = require('fs')
const xmlFile = fs.readFileSync('../../../Downloads/folkets_sv_en_public.xml', 'utf-8')
const options = {
attributeNamePrefix: '@_',
attrNodeName: false, // default is 'false'
@attilam
attilam / CreateLegacyAnimationClip.cs
Created December 6, 2018 19:37
Create Legacy AnimationClips using the Asset Menu in Unity
using System.IO;
using UnityEditor;
using UnityEngine;
public class CreateLegacyAnimationClip {
[MenuItem("Assets/Create/Animation (Legacy)", false, 402)]
public static void CreateIt()
{
AnimationClip clip = new AnimationClip();
@attilam
attilam / mail.google.com.css
Created October 19, 2018 13:36
My Stylus CSS tweaks
.th td {
padding: 8px 6px;
font-weight: bold;
}
.ts {
color: #006;
}
; AutoHotkey script to get Accented characters
; character codes from https://unicodelookup.com/
; and https://www.fileformat.info/info/unicode/char/search.htm
#SingleInstance, force
#Hotstring * ? ; Expand immediately everywhere
; á
@attilam
attilam / rotonde_simple.php
Last active June 23, 2017 05:53
Small php script to serve rotonde json feeds
<?php
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"');
$profile = array(
"name" => "Attila Malarik",
"location" => "Rainy Budakeszi",
"color" => "#8872FF",
"avatar" => "http://rotonde.attilam.com/Rubinstein.png"
);
@attilam
attilam / share.sh
Last active February 16, 2017 06:34
Upload file to shared folder on site (replacing spaces with _ in filename), copy URL to clipboard, display notification.
#!/usr/bin/env bash
fname=$(basename -a -s $1)
underscore=${fname//[[:space:]]/_}
targetname="http://attilam.com/shared/$underscore"
curl -s -n -T "$1" ftp://attilam.com/public_html/shared/$underscore
echo -n $targetname | pbcopy
osascript -e "display notification \"$targetname\" with title \"File uploaded.\""