author: @sleepyfox
title: Everything old is new again
date: 9-Apr-2024
'Plus ça change, plus c'est la même chose' - (French) The more things change, the more they stay the same.
#ifndef H_SDLSIMPLE | |
#define H_SDLSIMPLE | |
#include <SDL2/SDL.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
// defines | |
typedef struct sdlsimple_events_t { | |
bool quit; |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
TL;DR: This describes the process, hardware, and software used to perform in-circuit programming of the 128Mbit SPI NOR flash (flash) in the Pinebook Pro (PBP) using u-boot on a micro SD Card.
You, the user of this information bear ALL responsibility for ANY outcome of its use, whether negative or positive.
The flash (identified below) this document refers to is rated for a minimum 100000 program/erase cycles. Exercising it beyond that limit will likely require its replacement which is non-trivial.
import requests | |
urlFrom = 'https://cloud.domainfrom.tld' | |
authFrom = ('username', 'password') | |
urlTo = 'https://nextcloud.domainto.tld' | |
authTo = ('username', 'password') | |
headers={'OCS-APIRequest': 'true', 'Content-Type': 'application/json'} | |
Awesome-WM is a X11 window manager, that is configured via Lua. Fennel is a Lisp for Lua. This shows a general setup of how to write your awesome-wm config using fennel directly without the compilation step (which would also work, but is not needed).
Fetch a recent Fennel version (the
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh
file and put it into a directory where you want the files to be saved.cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.$white: #ffffff; | |
$black: #000000; | |
$red50: #ffebee; | |
$red100: #ffcdd2; | |
$red200: #ef9a9a; | |
$red300: #e57373; | |
$red400: #ef5350; | |
$red500: #f44336; | |
$red600: #e53935; | |
$red700: #d32f2f; |
#!/data/data/com.termux/files/usr/bin/sh | |
# sudo for Termux | |
# For security reasons some environent variables are reset by su | |
# So we need to set LD_LIBRARY_PATH | |
# Root's HOME is set to 'termux's home/.suroot'. | |
# Startup files and other stuffs can be added there. | |
ROOT_HOME=$HOME/.suroot |