Skip to content

Instantly share code, notes, and snippets.

@Piskvor
Piskvor / u2f.sh
Created Aug 13, 2021
Ubuntu 18.04 u2f
View u2f.sh
# find the new device
lsusb -t
> Port 3: Dev 20, If 1, Class=Chip/SmartCard
# device number from lsusb "Dev"
lsusb -s 20
> Bus 001 Device 020: ID 32a3:3201
@Piskvor
Piskvor / shrnuti.txt
Created Mar 30, 2020
Text Ina Koldová
View shrnuti.txt
Děcka, pojďme si to shrnout. Kdybych na někoho nebo něco zapomněla, neváhejte mě doplnit!!!
Je 1.3.2020 a do České republiky právě dorazila světová pandemie koronaviru.
Premiér pořádá minimálně tři tiskovky denně a tlumočníkům do znakové řeči začíná nejhorší šichta jejich kariéry.
Objevují se první případy nákazy. Soukromá laboratoř rychle a levně otestuje ty, které státní zařízení testovat odmítla. Stát na ni ihned zaklekne a testování zakáže.
Zakleknutá lékařka i přes přísný zákaz vyvíjí jednoduchý test a poskytuje ho všem zdarma. Celý svět kromě ČR jí může utrhat ruce.
@Piskvor
Piskvor / phpstan-check-on-save.md
Created Sep 27, 2019
Make PhpStorm check the current PHP file on save.
View phpstan-check-on-save.md

PhpStorm + PhpStan watcher

PhpStorm - Settings - Tools - File Watchers (create new)

  • File type: PHP
  • Scope: Project files
  • Program (wherever your phpstan is located, obvs.): $ContentRoot$/vendor/phpstan/phpstan/bin/phpstan
  • Arguments: analyse $FilePath$
  • Working directory (this is probably the directory with phpstan.neon): $ContentRoot$
  • Show console: on error
@Piskvor
Piskvor / blink_ip.pl
Created Feb 19, 2019 — forked from chrismeyersfsu/blink_ip.pl
Raspberry Pi Blink Ip Address
View blink_ip.pl
@Piskvor
Piskvor / RPi-install-wifi.sh
Created Mar 6, 2018 — forked from kmonsoor/RPi-install-wifi.sh
install wifi adapter drivers on Raspberry Pi; origin: http://www.fars-robotics.net/install-wifi
View RPi-install-wifi.sh
#!/bin/bash
#set -e
# origin-source: http://www.fars-robotics.net/install-wifi
# install-wifi - v9.4 - by MrEngman.
# After downloading this script:
# $ sudo mv ./install-wifi /usr/bin/install-wifi
# $ sudo chmod +x /usr/bin/install-wifi
# $ sudo install-wifi -h
#
@Piskvor
Piskvor / index.php
Last active Sep 12, 2018
Simple logger for requests
View index.php
<?php
declare(strict_types=1);
/*
Usage:
start PHP devel server in this script's directory:
php -S [::]:8888
send requests to http://your-ip-address:8888/
JSON events are logged to event.log
@Piskvor
Piskvor / experiments_lines_drag.user.js
Last active Dec 30, 2016 — forked from spite/gist:90e3dbf8e117660f6788a5748ae06cad
Go to https://lines.chromeexperiments.com/drag/, start the experience and run this code in the console - or install it as a userscript.
View experiments_lines_drag.user.js
// ==UserScript==
// @name Animate the Lines WebGL experiment automatically
// @namespace https://gist.github.com/spite/90e3dbf8e117660f6788a5748ae06cad
// @version 0.2
// @description Automatically drags the mouse, leading to a pleasant effect
// @author spite, userscripted by Piskvor
// @match https://lines.chromeexperiments.com/drag/
// @grant none
// @updateURL https://gist.github.com/Piskvor/41df1f68b44b43100552126c76e2f609/raw/experiments_lines_drag.user.js
// ==/UserScript==
@Piskvor
Piskvor / Open_in_JOSM.user.js
Last active Dec 19, 2016
Open a page (GPX track, image, etc.) through JOSM's Remote Control from browser's context menu
View Open_in_JOSM.user.js
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details. */
// ==UserScript==
// @name Open in JOSM
// @namespace http://osm.piskvor.org/
// @description Open a page (GPX track, image, etc.) through JOSM's Remote Control from browser's context menu