Skip to content

Instantly share code, notes, and snippets.

View dasmikko's full-sized avatar
💻
Code... code...

dasmikko

💻
Code... code...
View GitHub Profile
@dasmikko
dasmikko / clock.py
Created October 24, 2023 11:17
Inky phat clock
#!/usr/bin/env python3
from PIL import Image, ImageFont, ImageDraw
from font_hanken_grotesk import HankenGroteskBold, HankenGroteskMedium
from inky.auto import auto
import time
from datetime import datetime
# Setup display
inky_display = auto()
@dasmikko
dasmikko / i18n.js
Created October 1, 2021 05:46
Split a single vue-i18n langauge file multiple languages in a single object
/**
i18n.js
**/
let langs = {}
function setDeepValue(obj, path, value) {
let newPath = [...path]
const currentKey = newPath[0]
[oracle-codeready]
name=Oracle Codeready
#baseurl=https://download.fedoraproject.org/pub/epel/$releasever/Everything/$basearch
#metalink=http://yum.oracle.com/repo/OracleLinux/OL8/codeready/builder/x86_64
baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/codeready/builder/x86_64
enabled=1
gpgcheck=0
@dasmikko
dasmikko / show_help.sh
Created June 23, 2020 13:05
Show rofi menu with sxhkd keybindings
cat ~/.config/sxhkd/sxhkdrc | awk '/^[a-z]/ && last {print $0,"\t",last} {last=""} /^#/{last=$0}' | column -t -s $'\t' | rofi -dmenu -i -no-show-icons -width 1000
@dasmikko
dasmikko / setupWM
Last active June 22, 2020 09:19
Install bspwm + sxhkd + polybar
#!/bin/bash
set -e
sudoUser=$SUDO_USER
compilationPath="/home/$sudoUser/StuffToBeCompiled"
echo "Installing compiling tools"
apt install -y clang git cmake python3-sphinx
@dasmikko
dasmikko / disablexhc.service
Created March 27, 2020 17:18
service file for disabling xhc wakeup
[Unit]
Description=Disable XHC in wakeup
[Service]
ExecStart=/bin/bash -c "echo XHC >> /proc/acpi/wakeup"
[Install]
WantedBy=multi-user.target
@dasmikko
dasmikko / midiDrumsTovJoy.py
Last active January 10, 2020 19:21
FreePie Midi Drums to vJoy
# This FreePie script is for using Midi Drums with Clone Hero
# Install vJoy.
# Install FreePIE.
# Connect midi drums
# Copy/paste or open this code in/into FreePIE. Save it as a script, then press run. If it all works, you should be able to monitor the joystick outuput with vJoy's monitor program.
# Please note: These midi notes are setup for the Alesis Crimsom 2 Mesh kit, and notes may vary from drum module to module
# feel free to change the input midi nodes on the lists
# You can setup multiple midi notes to a single joystick buttons. Like have the hihat and tom 1 map to the yellow drum
@dasmikko
dasmikko / index.js
Created October 21, 2019 06:55
Nuxt Express server
/**
* Place this file inside the "/server" folder in the root project
*/
const express = require('express')
const consola = require('consola')
const { Nuxt, Builder } = require('nuxt')
const app = express()
// Import and Set Nuxt.js options
const config = require('../nuxt.config.js')
background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px);
0 = "recv_coins",
1 = "levelup",
2 = "quoted",
3 = "mentioned",
4 = "newthread",
5 = "accepted",
6 = "newreply",
7 = "bannedcheat",
8 = "rating",
9 = "generic"