Skip to content

Instantly share code, notes, and snippets.

# mount c drive inside WSL
sudo mount -t drvfs C: /mnt/c
pipenv run pip install pip==18.0

Shell Tips

re-runs the previous command as sudo

!! re-runs last succsessful command
sudo !!

killing and yanking text

ctrl - k

# assuming vim compiled with python 3
# use :version to check
# install powerline globally
sudo -H pip3 install powerline
# add to .vimrc
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
@erols
erols / rc.local
Created March 17, 2018 21:36
rc.local of pi node
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@erols
erols / gist:f7ba250d084de555a49c9e0982dca3e5
Created December 20, 2017 12:08
checkout list of files inadvertently changed
git status | grep modified: | cut -c 12- | xargs git checkout
Verifying that "erols0.id" is my Blockstack ID. https://explorer.blockstack.org/name/erols0.id
0xc59e15D8e482707ca9F4E24650C17cEF5cC40f2e
{
"coord": {
"lon": 145.77,
"lat": -16.92
},
"weather": [
{
"id": 803,
"main": "Clouds",
"description": "broken clouds",
@erols
erols / gist:864b6b94000ece73051acc58270763e4
Created September 12, 2016 14:01
add to html as standard
<!-- If IE use the latest rendering engine -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Set the page to the width of the device and set the zoon level -->
<meta name="viewport" content="width = device-width, initial-scale = 1">