Skip to content

Instantly share code, notes, and snippets.

View brihter's full-sized avatar

Bostjan Rihter brihter

  • Internet
View GitHub Profile
@brihter
brihter / snippets.code-snippets
Last active October 31, 2022 10:29
Visual Studio Code Snippets
{
"JS Module": {
"scope": "javascript",
"prefix": "$mod",
"body": [
"const $1 = (opts = {}) => {",
" const $2 = async () => {",
" $0",
" }",
"",
@brihter
brihter / gogh2alacritty.md
Last active August 25, 2023 00:49
Using Gogh color schemes with Alacritty on ArchLinux.

Get alacritty.

yay alacritty

Install colortty that knows of Gogh color scheme conversion.

cd /tmp
@brihter
brihter / Echart.js
Last active November 20, 2020 16:57
ExtJS 6 Echarts adapter
// usage:
// {
// xtype: 'ux_echart',
// echartCfg: {
// // ...
// }
// }
Ext.define('Ext.ux.Echart', {
extend: 'Ext.Container',
@brihter
brihter / Highchart.js
Created September 7, 2019 18:27
ExtJS 6 Highcharts adapter
// usage:
// {
// xtype: 'ux_highchart',
// highchartCfg: {
// // ...
// }
// }
Ext.define('Ext.ux.Highchart', {
extend: 'Ext.Container',
@brihter
brihter / capslock2ctrl.ps1
Last active April 25, 2019 08:17
remap caps lock to ctrl
# source https://superuser.com/a/997448/1027439
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);
@brihter
brihter / tmux.md
Created April 21, 2019 18:03
tmux cheatsheet

tmux

the default modifier key is Ctrl + b

general

tmux ls                      # list sessions
tmux new -s myname           # new session by name
tmux kill-session -t myname # kill session by name
@brihter
brihter / docker.sh
Last active May 8, 2024 18:20
docker cheatsheet
# get image
docker pull neo4j
# list
docker ps # show running containers
docker ps -a # + show all
# new
docker run neo4j # create a new container
docker run --name neo4j-local neo4j # + add a name
@brihter
brihter / export.md
Created November 21, 2018 08:15
1001tracklist playlist export bookmarklet

bookmarklet (add this to your bookmarks):

javascript:(() => {let buffer = [];document.querySelectorAll('div[itemtype="http://schema.org/MusicPlaylist"] meta[itemprop=name]').forEach(n => buffer.push(n.attributes.content.value));document.querySelector('body').innerHTML = buffer.join('<br />')})()

source:

javascript:(function () {
@brihter
brihter / chroma.py
Created April 13, 2018 13:46
audio chroma features detection, usage: "python3.6 chroma.py -d data/"
from __future__ import print_function
import sys
import os
import os.path
from os.path import basename
import argparse
import json
import hashlib
import librosa
import librosa.display
@brihter
brihter / TreeExperiment.cs
Created August 9, 2016 22:51
some fs & treenode testing
using System;
using System.Collections.Generic;
using System.IO;
using System.Collections;
using System.Linq;
namespace Sandbox
{
public class TreeExperiment : IExperiment
{