Skip to content

Instantly share code, notes, and snippets.

🎲
I like dice

Gil Goncalves LuRsT

🎲
I like dice
Block or report user

Report or block LuRsT

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LuRsT
LuRsT / news.py
Last active May 6, 2019
Getting reuter news in a raspberry pi using Pimoroni wHAT
View news.py
#!/usr/bin/env python
from PIL import Image, ImageFont, ImageDraw
from bs4 import BeautifulSoup
from font_hanken_grotesk import HankenGroteskMedium
from inky import InkyWHAT
import requests
def main():
@LuRsT
LuRsT / README.md
Last active Sep 5, 2019
Using reMarkable tablet with Arch linux using netctl
View README.md

Find out the name of the reMarkable interface, by running this command:

$ ip link

If you don't know your other connection names, run the command, then plug the reMarkable into the computer and run the command again, it should be the new connection that shows up

Install dhclient if you don't have it

View config.clj
(logging/init {:file "riemann.log"})
(let [host "0.0.0.0"]
(tcp-server {:host host})
(udp-server {:host host})
(ws-server {:host host}))
(defn select-values [map ks]
( remove nil? ( reduce #(conj %1 (map %2)) [] ks)))
; format an event by appending service, name, type and source fields
@LuRsT
LuRsT / 10commands.md
Last active Aug 23, 2019
10 Command-ments talk
View 10commands.md
@LuRsT
LuRsT / list_comprehensions.py
Last active Mar 17, 2017
List Comprehensions in Python
View list_comprehensions.py
# 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:
@LuRsT
LuRsT / loading_bar.py
Created Dec 13, 2016
Loading bar in Python 3
View loading_bar.py
import time
for x in range(10):
time.sleep(1)
print("Progress {:2.1%}".format(x / 10), end="\r")
View keybase.md

Keybase proof

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:

@LuRsT
LuRsT / slack_theme.txt
Created Dec 23, 2015
Hacker Slack theme
View slack_theme.txt
#000000,#000000,#006600,#00ff00,#222222,#44AA44,#ff0000,#ff0000
@LuRsT
LuRsT / Dockerfile
Created Sep 19, 2015
Dockerfile for `hr`
View Dockerfile
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
View json_for_humans.py
from json import loads as json_decode
from json import dumps as json_encode
You can’t perform that action at this time.