Skip to content

Instantly share code, notes, and snippets.

View hicolour's full-sized avatar

Marek Prochera hicolour

View GitHub Profile
#!/bin/bash
if [[ ! $1 ]]; then
echo -e "Usage:\n\n\t$0 'file name'"
exit 1
fi
f=$(file 2>/dev/null /proc/*/fd/* | awk '$NF == "(deleted)"{print $(NF-1)}')
if [[ $f ]]; then
@hicolour
hicolour / firmware_upgrade_lenovo_thinkpad.md
Last active August 20, 2019 08:10
firmware_upgrade_lenovo_thinkpad

Intro

Lack of firmware upgrades may cause various unpredicted issues, in my case it was freezing tailing windows manager.

Upgrade rutine

Get the utility - fwupdate - tools for using the ESRT and UpdateCapsule() to apply firmware update

pi@pi3:~ $ history
1 passwd
2 sudo raspi-config
3 reboot
4 sudo reboot
5 sudo nano /etc/network/interfaces
6 reboot
7 sjudo reboot
8 sudo reboot
9 ping wp.pl
@hicolour
hicolour / pmd-exclude-all.xml
Last active September 2, 2016 09:32
PMD - exclude all default rules and tulesets
<rule ref="rulesets/java/basic.xml">
<exclude name="JumbledIncrementer"/>
<exclude name="ForLoopShouldBeWhileLoop"/>
<exclude name="OverrideBothEqualsAndHashcode"/>
<exclude name="DoubleCheckedLocking"/>
<exclude name="ReturnFromFinallyBlock"/>
<exclude name="UnconditionalIfStatement"/>
<exclude name="BooleanInstantiation"/>
<exclude name="CollapsibleIfStatements"/>
<exclude name="ClassCastExceptionWithToArray"/>
@hicolour
hicolour / poc-goodness.md
Last active June 10, 2016 14:47
Technology POC
@hicolour
hicolour / jvm-debuging.md
Last active July 21, 2020 03:27
jvm-debuging

tools

basic info

jcmd <PID> PerfCounter.print

thread dump

jcmd <PID> Thread.print

enable jmx

jcmd ManagementAgent.start

# basic info
jcmd <PID> PerfCounter.print
# thread dump
jcmd <PID> Thread.print
# enable jmx
jcmd <PID> ManagementAgent.start
@hicolour
hicolour / linux-tools.md
Last active September 29, 2015 07:44
linux-tools.md
@hicolour
hicolour / intelij-plugins-list
Created August 13, 2015 10:52
not-default-intelij-plugins-list
- key promoter