Skip to content

Instantly share code, notes, and snippets.

View piano.sh
#!/bin/sh
# Replace with your controller model
KB_MODEL="BK492"
# check if jack and a2jmidid are active
if jack_control status && (a2j_control --status | grep "enabled"); then
# kill any previous instances of fluidsynth
for id in $(pidof fluidsynth); do
kill $id
View ds4led.py
#!/bin/env python3
import sys
import subprocess
from os import listdir
LEDPath = "/sys/class/hidraw/hidraw2/device/leds/"
def getLEDColorID():
"""
View markor log
01-27 01:04:50.468 2849 2969 I ActivityManager: START u0 {act=android.intent.action.MAIN typ=null flg=0x10200000 cmp=ComponentInfo{net.gsantner.markor/net.gsantner.markor.activity.MainActivity}} from uid 1000 on display 0
01-27 01:04:50.497 2849 2969 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=null next=ActivityRecord{79dfded0 u0 net.gsantner.markor/.activity.MainActivity t7994} mFocusedStack=ActivityStack{e094a43d0 stackId=1, 14 tasks}
01-27 01:04:50.500 2849 2969 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=null next=ActivityRecord{79dfded0 u0 net.gsantner.markor/.activity.MainActivity t7994} mFocusedStack=ActivityStack{e094a43d0 stackId=1, 14 tasks}
01-27 01:04:50.506 2849 13912 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=TaskRecord{aa7d0f0d0 #7984 A=fr.neamar.kiss U=0 StackId=0 sz=1} next=ActivityRecord{79dfded0 u0 net.gsantner.markor/.activity.MainActivity t7994} mFocusedStack=ActivityStack{e094a43d0 stackId=1, 14 tasks}
01-27 01:04:50.514
View installing arch.md
  1. partition the disk, with cfdisk:
    1. EFI/boot partition 512M (sda1), partition type EF00 on gdisk
    2. root partition, rest of the space, with LVM format (sda2)
  2. format:
    1. format boot mkfs.fat -F32 /dev/sda1
  3. encryption:
    1. cryptsetup luksFormat /dev/sda2 & cryptsetup open /dev/sda2 cryptolvm
    2. create physical volume pvcreate /dev/mapper/cryptolvm
    3. create volume groups vgcreate MyVol /dev/mapper/cryptolvm
    4. create logical volumes lvcreate -L 1G MyVol -n swap and lvcreate -L 100%FREE MyVol -n root
View installing arch.md

steps

  1. verify the boot mode: ls /sys/firmware/efi/efivars
  2. verify internet ping archlinux.org
  3. update system clock timedatectl set-ntp true
  4. wipe the disk:
    1. cryptsetup open --type plain -d /dev/urandom /dev/sda to_be_wiped
    2. dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress
    3. cryptsetup close to_be_wiped
  5. partition the disk, with cfdisk:
View installing arch.md
  1. verify the boot mode: ls /sys/firmware/efi/efivars
  2. verify internet ping archlinux.org
  3. update system clock timedatectl set-ntp true
  4. wipe the disk:
    1. cryptsetup open --type plain -d /dev/urandom /dev/sda to_be_wiped
    2. dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress
    3. cryptsetup close to_be_wiped
  5. partition the disk, with cfdisk:
    1. EFI/boot partition 512M (sda1), partition type EF00 on gdisk
    2. root partition, rest of the space, with LVM format (sda2)
View dopny recipe spanish.md

Pizza

ingrediente porcentaje gramos
Harina 100% 622g
Agua 61% 379g
Levadura 0.5% 3.1g
Sal 1.75% 11g
Azucar 2% 12.5g
Aceite 3% 18g
View elio_movie_list.md
  • Brazil
  • Amadeus
  • 12 Monkeys
  • Se7en
  • Straw Dogs
  • Eraserhead
  • Rosemary's Baby
  • Psycho
  • Sorcerer
  • Schindler's List
View init.vim
" Plugins ---------------------------------------------------------
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/bundle')
Plug 'vimwiki/vimwiki'
Plug 'mattn/webapi-vim'
View vfio_gpu_switch
#!/bin/bash
if [ "$(id -u)" -ne 0 ]; then
printf "In order to change the drivers, launch this script with SUDO!"
fi
troubleshoot()
{
printf "\\nContents of %s" "$xorg"