Skip to content

Instantly share code, notes, and snippets.

@szabo92
szabo92 / Wipe USB
Last active August 29, 2017 01:43
Wipe USB drive when you cannot format or delete partitions
# if sdb is the device name
sudo wipefs -a /dev/sdb
@szabo92
szabo92 / ChromePasswords
Last active September 20, 2017 02:56
Export Google Chrome passwords
# enable import and export
chrome://flags/#password-import-export
# access a menu with the export button
chrome://settings-frame/passwords
@szabo92
szabo92 / import_local_program.py
Created October 11, 2017 19:59
Import local program to a script
import sys
sys.path.append("/path/to/project/directory")
import project
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@szabo92
szabo92 / docker_terminal.sh
Created November 15, 2017 04:27
Run a terminal in a Docker container
docker exec -it <containerIdOrName> bash
@szabo92
szabo92 / find_by_hash.sh
Created November 17, 2017 23:08
Find file by hash in a local directory
find /foo/bar | xargs md5sum | grep YOUR_MD5_SUM_HERE
@szabo92
szabo92 / update_node.sh
Last active December 22, 2017 12:51
Update Nodejs
node --version
sudo npm install npm@latest -g
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node --version
@szabo92
szabo92 / vanilla-gnome.sh
Last active January 17, 2018 06:35
Vanilla GNOME in Ubuntu
sudo apt install gnome-session
@szabo92
szabo92 / sudoers
Last active March 3, 2018 22:27
Add user to sudoers
sudo adduser username sudo
## alternatively
visudo
# add at the end
username ALL=(ALL:ALL) ALL
@szabo92
szabo92 / version
Created March 3, 2018 22:38
Debian version
lsb-release -da
# if missing
sudo apt install lsb-release
## alternatively
cat /etc/issue