This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
rahat = [ | |
(10, "kymppiä"), | |
(5, "vitosta"), | |
(2, "kaksieuroista"), | |
(1, "euroa") | |
] | |
hinta = int(input("Ostosten hinta: ")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set numerichints | |
set typelinkhints | |
set noautofocus | |
set manualcompletion | |
let barposition = "bottom" | |
unmap x | |
map d closeTab | |
map u :restore<Space> | |
map <C-u> scrollPageUp | |
map <C-d> scrollPageDown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this with Compton | |
// compton --backend glx --force-win-blend --glx-fshader-win "$(cat hash-shader.glsl)" | |
uniform float opacity; | |
uniform bool invert_color; | |
uniform sampler2D tex; | |
// HSV conversion taken from http://stackoverflow.com/a/17897228 | |
vec3 rgb2hsv(vec3 c) { | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
device_path = '/dev/hidraw7' | |
fd = os.open(device_path, os.O_RDWR) | |
report = bytearray(78) | |
report[0] = 0x11 | |
report[1] = 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
int main(int argc, char **argv) { | |
if (argc != 2) { | |
printf("Usage: %s hidraw_device\n", argv[0]); | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkt = bytearray(b'\x11\x80\x00\xff\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') | |
device = open('/dev/hidraw7', 'wb') | |
device.write(pkt) | |
device.close() |
NewerOlder