Skip to content

Instantly share code, notes, and snippets.

View ldrahnik's full-sized avatar

Lukáš Drahník ldrahnik

  • Uphold Scout values. INDRC Czech Academy of Sciences @SCIENCE-OPEN. Previously FNB @PRO-HOSPITAL VFN @PRO-OC. Open source enthusiast. Use Elementary OS.
  • Prague, Czechia
View GitHub Profile
@ldrahnik
ldrahnik / guide.sh
Last active March 21, 2022 11:31
VirtualBox Elementary Loki
sudo modprobe vboxdrv
(pokud se upgradovat kernel tak je potřeba zavolat i `sudo aptitude install linux-headers-`uname -r``, tedy naisntalovat sudo apt install aptitude)
sudo VirtualBox ./../../Downloads/MSEdge\ -\ Win10.ova
heslo k Win10: Passw0rd!
@ldrahnik
ldrahnik / gist:098f0a4d22d2903ea0724acf83386efe
Last active March 1, 2022 12:49
Puppeteer on heroku apps
heroku builds:cache:purge --app registr-dzs --confirm <app-name>
heroku buildpack --app <app-name>
heroku restart -a <app-name>
// start build manually in UI
# /etc/fahclient/config.xml
<config>
<!-- User Information -->
<passkey v='XY'/>
<team v='249477'/>
<user v='ldrahnik'/>
<command-port v='36330'/>
@ldrahnik
ldrahnik / guide.sh
Last active August 8, 2020 10:11
Networkx pip Ubuntu18.04
sudo apt-install python3-pip
pip3 --version
# pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
sudo apt-install python-pip
pip --version
# pip --version
# pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
# https://networkx.github.io/documentation/stable/install.html
@ldrahnik
ldrahnik / guide.sh
Last active May 13, 2020 17:55
Rapsberry PI and Ubuntu 20.04 64-bit server (only wifi connection)
Download Raspberry Pi Imager and flash SD card https://www.raspberrypi.org/downloads/
# login: default credentials are ubuntu/ubuntu
# wi-fi
sudoedit /etc/netplan/50-cloud-init.yaml # and add lines below
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
@ldrahnik
ldrahnik / guide.pl
Created April 14, 2019 14:53
Prolog - odstraňování duplikací v seznamu
komprese([], []).
komprese([S], [S]).
komprese([S1, S2|T], [S1|D]) :- S1 \= S2, komprese([S2|T], D).
komprese([_, S2|T], D) :- komprese([S2|T], D).
@ldrahnik
ldrahnik / post-install.sh
Last active April 30, 2019 15:34
Windows 10
# google chrome
https://www.google.cz/chrome/thank-you.html?statcb=0&installdataindex=empty
# visual studio 2018 community
https://visualstudio.microsoft.com/cs/downloads/?rr=https%3A%2F%2Fwww.google.com%2F
# 1) Enable support for old .NET package versions in /control panels/all programs and features/enable or disable native windows features -> .NET 3.5 FW (includes 2.0 / 3.0)
# install git
https://www.atlassian.com/git/tutorials/install-git#windows
# 1) git aliases, e-mail address & name: https://gist.github.com/ldrahnik/f2124d2ff1b130bd14f53834ec0b398b
Oh Christmas Tree
Forensics
25 December 14th, 7:46:49 PM
=============================
Merry Christmas.jpg -> dowloaded file -> opened file in editor glogg -> found string X-MAS
X-MAS{0_Chr15tmas_tr33_is_th1s_flag_i_wonder}
Santa The Weaver
@ldrahnik
ldrahnik / guide.php
Last active November 16, 2018 10:49
Binární vyhledávání v seřazeném poli #PHP
<?php
// position => key
$table = array(
1 => 10,
2 => 20,
3 => 30,
4 => 40,
5 => 50,
6 => 60,
@ldrahnik
ldrahnik / guide.sh
Created October 26, 2018 16:32
VS2017 .NET standard 2.0 - re-init already existing project
# 1) Enable support for old .NET package versions in /control panels/all programs and features/enable or disable native windows features -> .NET 3.5 FW (includes 2.0 / 3.0)
# 2) Create new project .NET 2.0-3.5
# 3) Init git repository `git init`
# 4) Add empty project source files `git add .` // delete something if u do not need
# 5) `git stash`
# 6) echo Title > Readme.md
# 7) `git add Readme.md` `git commit -m 'readme.md'` `git push`
# 6) Add remote `git remote add origin <git-repository-url>
# 7) Git pull `git pull origin master --allow-unrelated-histories` (because readme.md)
# 8) `git stash pop`