Skip to content

Instantly share code, notes, and snippets.

View synaptiko's full-sized avatar

Jiří Prokop synaptiko

View GitHub Profile
@synaptiko
synaptiko / index.html
Last active December 19, 2015 16:59
LED PWM with Python & Node.js
<!DOCTYPE html>
<html>
<head>
<style>
label {
display: inline-block; width: 20px; height: 20px; float: left; text-align: center;
}
input {
display: inline-block; width: 25%; height: 20px;
}
@synaptiko
synaptiko / screen-how-to.md
Last active December 20, 2015 19:58
Screen command manual excerpt

Příkazy:

Ctrl+a +

  • create – vytvoří nový terminál
  • previous – přepne na předchozí terminál
  • next – přepne na následující terminál
  • 09 – přepne na terminál dle pořadí od nuly
  • " – zobrazí seznam otevřených terminálů (se shiftem!)
  • renAme – přejmenování aktuální obrazovky
  • Split – rozdělí obrazovku
echo -e "\e[8;32mI'm hidden!\e[0m"
node
> console.log('\033[8;32mI'm hidden!\033[0m')
rust
println!("\x1B[8;32mI'm hidden!\x1B[0m");
// documentation here: http://ascii-table.com/ansi-escape-sequences.php
@synaptiko
synaptiko / index.html
Last active March 13, 2016 19:39
Servo PWM controller as Node.js service (requires kernel and modules from Adafruit's Occidentalis: http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-2)
<!DOCTYPE html>
<html>
<head>
<style>
label {
display: inline-block; width: 100px; height: 20px; float: left; text-align: left;
}
input {
display: inline-block; width: 25%; height: 20px;
}
@synaptiko
synaptiko / i3msg-jq.sh
Created August 30, 2016 17:33
Example how to use i3msg command
#!/usr/bin/env bash
isWorkspaceFocused=$(i3-msg -t get_workspaces | jq 'map(select(.focused==true))|map(.num)|map(select(. == 10))|length' 2> /dev/null)
isKicktermRunning=$(i3-msg -t get_tree | jq "recurse(.nodes[]) | .window_properties | objects | .class" | grep '"Kickterm"' | wc -l 2> /dev/null)
if [ $isKicktermRunning -eq 0 ]; then
/home/jprokop/Projects/kickterm/new-i3.py >& /dev/null
fi
if [ $isWorkspaceFocused -eq 0 ]; then
@synaptiko
synaptiko / 8188eu.ko
Last active May 1, 2019 20:23
Useful links related to "hard" linux things when I was experimenting with Raspberry Pi, cross-compilation, emulation etc.
@synaptiko
synaptiko / 01-how-to-modify-physical-display-size-in-edid.md
Last active June 6, 2023 09:51
How to modify physical display size in EDID (on ArchLinux with systemd boot)

How to modify physical display size in EDID

Following method describes how to fix EDID display size information of your monitor if it's wrong (some of Samsung's monitors report incorrect size when connected over HDMI, for example). It assumes that your monitor is connected to HDMI1 port (HDMI-A-1 is full kernel address).

I used following tools: