Skip to content

Instantly share code, notes, and snippets.

View LuRsT's full-sized avatar
🎲
I like dice

Gil Gonçalves LuRsT

🎲
I like dice
View GitHub Profile
@LuRsT
LuRsT / gist:42154a7f049f79cf18388db0cca5dd9b
Created July 3, 2021 09:19
One time passcodes for remarkable
https://my.remarkable.com/device/connect/desktop
@LuRsT
LuRsT / smtp_echo_server.py
Created May 25, 2021 06:00
SMTP Echo Server (a smtp server to run locally, prints out the emails as they arrive)
#!/usr/bin/env python
import asyncore
from email import message_from_string
from smtpd import DebuggingServer
class PrettyDebugginServer(DebuggingServer):
def process_message(self, peer, mailfrom, rcpttos, data):
@LuRsT
LuRsT / do_backup.sh
Created May 20, 2021 07:00
A script to make backups with rsync easier (built a long time ago)
#!/bin/bash
ORIGIN_LOCATION=$1
BCK_LOCATION=$2
if [[ ! -d "${ORIGIN_LOCATION}" ]]; then
echo "NEEDS A SOURCE LOCATION!"
exit 244
fi
@LuRsT
LuRsT / README.md
Created June 15, 2020 10:19
How to scale your brain

From years of watching master programmers, I have observed certain common patterns in their workflows. From years of coaching skilled journeyman programmers, I have observed the absence of those patterns. I have seen what a difference introducing the patterns can make.

Here are ways effective programmers get the most out of their precious 3e9 seconds on the planet.

The theme here is scaling your brain. The journeyman learns to solve bigger problems by solving more problems at once. The master learns to solve even bigger problems than that by solving fewer problems at once. Part of the wisdom is subdividing so that integrating the separate solutions will be a smaller problem than just solving them together.

  • Slicing. Take a big project, cut it into thin slices, and rearrange the slices to suit your context. I can always slice projects finer and I can always find new permutations of the slices that meet different needs.
  • One thing at a time. We’re so focused on efficiency that we reduce the number of f
@LuRsT
LuRsT / README.md
Last active January 2, 2021 15:03
How to make Remarkable templates

A good article on this: https://blog.lucafluri.ch/2017-11-21/customizing-remarkableTablet

Resolution of templates: 1404x1872

Gimp techniques for converting a pdf into a template:

  • Open PDF with Gimp
  • Select area, Ctrl+V + Ctrl+C to create a layer, then "Layer" > "Scale Layer" to increase it's size.
  • Change "Colours" > "Shadows-Highlight" to increase the blackness of text/lines in the file.
#!/bin/fish
# This is a script to connect into an EC2 instance from the cluster -> task definition -> instance
# Requirements:
# - fzf
# - jq
set CLUSTER (aws ecs list-clusters | jq '.clusterArns[]' | fzf --height 40% --reverse --header CLUSTER | awk -F/ '{print $2}' | sed 's/"//')
set service (aws ecs list-services --cluster $CLUSTER | jq '.serviceArns[]' | fzf --height 40% --reverse --header SERVICE | awk -F/ '{print $2}' | sed 's/"//')
set task (aws ecs list-tasks --cluster $CLUSTER --desired-status "RUNNING" --service $service | jq '.taskArns[]' | awk -F/ '{print $2}' | sed 's/"//')
@LuRsT
LuRsT / leadership_ci.md
Last active October 27, 2019 19:16
This is a list of questions to check our decision making. (From: https://gist.github.com/simpsoka/14da775a63e22e5083141da5c48e6410)

Do I want to die on this hill?

  • Pass: This is morally good and if not handled has long term consequences
  • Fail: This if self serving

Am I including everyone?

  • Pass: My ego is not driving this conversation
  • Fail: The people in this conversation will only tell me I'm right and not push back
@LuRsT
LuRsT / news.py
Last active May 6, 2019 19:17
Getting reuter news in a raspberry pi using Pimoroni wHAT
#!/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 February 15, 2023 11:54
Using reMarkable tablet with Arch linux using netctl

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

@LuRsT
LuRsT / 10commands.md
Last active August 23, 2019 13:51
10 Command-ments talk