I hereby claim:
- I am lurst on github.
- I am lurst (https://keybase.io/lurst) on keybase.
- I have a public key ASDXWVXlJS3AZTrIuy8zkphJ5t7j8pAlYdHS_KGUq_DZOAo
To claim this, I am signing this object:
# Why list comprehensions? | |
fruits = ['orange', 'apple', 'pineapple'] | |
things = ['potato', 'orange', 'car', 'apple'] | |
# This will filter things and will create a new list with only fruits from | |
# things | |
new_list_of_things = [] | |
for thing in things: | |
if thing in fruits: |
import time | |
for x in range(10): | |
time.sleep(1) | |
print("Progress {:2.1%}".format(x / 10), end="\r") |
I hereby claim:
To claim this, I am signing this object:
FROM debian | |
RUN apt-get update && apt-get install -y curl | |
RUN curl https://raw.githubusercontent.com/LuRsT/hr/master/hr > /bin/hr | |
RUN chmod +x /bin/hr |
from json import loads as json_decode | |
from json import dumps as json_encode |
Inspired and based off of https://gist.github.com/defunkt/318247, since that script didn't work with my environment, I decided to improve on it.
You need to have bash
installed, but this was also tested in zsh
so feel free to change the hashbang, apart from that the only thing you need to do is to set the $BROWSER environment variable.
$ export BROWSER="firefox" # or "chromium-browser" or "chrome" or any browser you want
find . -type f | grep "$1$" | head -1 | xargs dirname |
cd $(find . -type d | grep "$1$" | head -1) |
#!/usr/bin/sh | |
startx -- `which Xvfb` :1 -screen 0 1024x768x24 2>>/dev/null & | |
VIRTUAL_X_PID=$! | |
echo "Virtual X started with PID: $VIRTUAL_X_PID" | |
DISPLAY=:1 slimerjs script.js |
syntax on | |
colorscheme desert | |
filetype plugin indent on | |
" 256 colors | |
set t_Co=256 | |
set backspace=indent,eol,start | |
set cmdheight=2 | |
set fileencodings=ucs-bom,utf-8,default,latin1 |