Discover gists
# SGR color constants | |
# rene-d 2018 | |
class Colors: | |
""" ANSI color codes """ | |
BLACK = "\033[0;30m" | |
RED = "\033[0;31m" | |
GREEN = "\033[0;32m" | |
BROWN = "\033[0;33m" | |
BLUE = "\033[0;34m" |
{ | |
"window.zoomLevel": 5, | |
"editor.formatOnSave": true, | |
"code-runner.executorMap": { | |
"python": "clear ; .\\venv\\Scripts\\python.exe" | |
}, | |
"code-runner.runInTerminal": true, | |
"code-runner.clearPreviousOutput": true, | |
// Python | |
"[python]": { |
Start debugserver:
tty0 # debugserver localhost:8000 main
Start tracing:
tty1 $ lldb
tty1 (lldb) command script import trace.py
tcp: | |
routers: | |
rou_dot: | |
entryPoints: | |
- dot | |
rule: HostSNI(`my.dot.domain.here`) | |
service: svc_dot | |
tls: | |
certResolver: le | |
services: |
This guide aims to be the reference for setting up Lando and PhpStorm tools on a WSL2 environment.
This assumes your project:
- lives in a WSL2 instance (something like
\\wsl$\Ubuntu\home\[user]\dev\my-demo-project
) - Is "Lando-initialized" (
lando init
) and runs (lando start
) - uses Composer, and dependencies are installed (
lando composer install
)
This guides relies on Docker for Windows, using the WSL2 based engine, and setup with WSL integration (Resources > WSL Integration
). Unfortunately I didn't find a solution to do without it and only rely on WSL's Docker.
{ config, lib, pkgs, ... }: | |
{ | |
imports = [ | |
${builtins.fetchTarball | |
"https://github.com/Mic92/sops-nix/archive/master.tar.gz" | |
}/modules/sops" | |
]; | |
users = { |
In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.
After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.
But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.
And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?
In dark rooms, in hushed tones, we speak of colours.
# /etc/profile.d/best_bash_history.sh | |
# Save 5,000 lines of history in memory | |
HISTSIZE=10000 | |
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing) | |
HISTFILESIZE=2000000 | |
# Append to history instead of overwrite | |
shopt -s histappend | |
# Ignore redundant or space commands | |
HISTCONTROL=ignoreboth | |
# Ignore more |