Skip to content

Instantly share code, notes, and snippets.

View artizirk's full-sized avatar

Arti Zirk artizirk

View GitHub Profile
mouse:usb:v145fp01ac:name:HID-compliant Mouse Trust Gaming Mouse:
MOUSE_DPI=2400@500
mouse:usb:v046dpc521:name:Logitech USB Receiver:
MOUSE_DPI=800@132
mouse:usb:v04d9pfa52:name:USB gaming mouse:
MOUSE_DPI=3500@1233
mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse:
arti@hackbook ~ % cat /boot/loader/entries/archlinux.conf
title Arch Linux (linux)
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=/dev/sda2 rw
options rootflags=subvol=@new-arch,noatime,discard,ssd,compress=lzo,space_cache
#options elevator=bfq iommu=pt
# this shit kills the performance i think
#options epb=15
@artizirk
artizirk / archlinux-mirror.py
Created August 12, 2016 01:26
This python script generates a file list for aria2 for downloading all the packages from all the repos using all the available mirrors
#!/usr/bin/python3
import os
import shutil
import tempfile
import subprocess
from pprint import pprint
from Reflector import MirrorStatus
ms = MirrorStatus()
@artizirk
artizirk / wifi.py
Created August 20, 2016 17:04
get wifi networks from networkmanager
mport NetworkManager
networks = []
SSID = None
for dev in NetworkManager.NetworkManager.GetDevices():
if dev.Interface != 'wlan0':
continue
# Enumerate available networks
for ap in dev.SpecificDevice().GetAccessPoints():
# Skip non-AP SSIDs
@artizirk
artizirk / on_chip.sh
Created May 14, 2017 17:14
NextThingCo 9$ CHIP stream video over wifi to composite out using ffmpeg
ffmpeg -re -i udp://0.0.0.0:1234 -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0 -f alsa default
@artizirk
artizirk / relay.ino
Created May 18, 2017 19:14
arduino relay controller
const byte relay1 = A4;
const byte relay2 = A2;
void setup() {
Serial.begin(9600);
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);
Serial.write(digitalRead(relay1) ? 'A' : 'a');
Serial.write(digitalRead(relay2) ? 'B' : 'b');
Serial.write('\n');
@artizirk
artizirk / max_perf.sh
Created July 28, 2017 08:36
Maximum system performance on a intel laptop
#!/bin/bash
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
cpupower frequency-set -g performance
x86_energy_perf_policy -v performance
cat /sys/kernel/debug/dri/0/i915_max_freq > /sys/kernel/debug/dri/0/i915_min_freq
@artizirk
artizirk / install.sh
Created June 11, 2017 03:06
Arch Linux full raid1 crypted btrfs install
#!/usr/bash
set -o xtrace
HOSTNAME="crypto"
SERVER="http://172.20.20.154"
echo "Stupid Arch cluster installer"
umount -R /mnt
mdadm --stop /dev/md0
@artizirk
artizirk / index.html
Last active August 25, 2017 08:13
simple falcon file upload
<form action="/upload" method="post" enctype="multipart/form-data" id="upload">
<input name="file" type="file" id="fileinput"><br>
<input type="submit" value="Upload Image" name="submit">
</form>
<button id="startupload">Upload</button>
<script>
"use strict";
// Select your input type file and store it in a variable
const input = document.getElementById('fileinput');