This data is derived from OpenStreetMap.
Ⓒ OpenStreetMap contributors
The data is published under the terms of the Open Database License.
This data is derived from OpenStreetMap.
Ⓒ OpenStreetMap contributors
The data is published under the terms of the Open Database License.
At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.
What killed Haskell, could kill Rust, too
What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.
Is Haskell dead?
## | |
## Create a "spammers.txt" file with all the JIDs (Jabber IDs) to delete. One in each line: | |
## user1@server.tld | |
## user2@server.tld | |
## user3@server.tld | |
## ... | |
## then run this command: | |
cat spammers.txt | xargs -L1 -i bash -c 'jid={}; name=${jid%@*}; domain=${jid##*@}; ejabberdctl unregister $name $domain; echo "deleted $jid"' |
Put these lines into your server's .bashrc: | |
## | |
## TMUX auto attach | |
## | |
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session | |
if which tmux >/dev/null 2>&1; then # check if tmux is installed | |
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux" | |
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session | |
if [[ -z "$ID" ]] ;then # if not available create a new one | |
tmux new-session |
This is how to automatically delete cached image previews from your Mastodon instance if they are older than 7 days. | |
Log in as your "mastodon" User or log in as root and then change to the "mastodon" user, who runs Mastodon: | |
# su - mastodon | |
Open crontab: | |
$ crontab -e | |
... and add these lines to your crontab: |
// see: https://github.com/mikeobrien/HidLibrary/tree/master/src/HidLibrary | |
using HidLibrary; | |
using System; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
namespace Environment.HardwareData.SensorData | |
{ | |
class TempSensor | |
{ |
import urllib.request | |
import subprocess | |
import psutil | |
import time | |
import socket | |
class BahnWifi: | |
def __init__(self): | |
self.loginUrl = 'http://www.wifionice.de/?login' | |
self.logoutUrl = 'http://www.wifionice.de/?logout' |
[Unit] | |
Description=RUNALYZE queue | |
After=network.target | |
[Service] | |
Type=simple | |
User=www-data #adjust the user | |
WorkingDirectory=/var/www/example.runalyze.com/htdocs/ | |
ExecStart=/usr/bin/php /var/www/example.runalyze.com/htdocs/bin/console runalyze:queue:consume --env=prod | |
Restart=always |
First install Termux
Then there are two options:
Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER:
#!/bin/bash | |
USER=${1:-sebble} | |
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
PAGES=$((658/100+1)) | |
echo You have $STARS starred repositories. | |
echo |