- GUI file managers are built on top of coreutils (GNU/BSD)
- you can just run the coreutils directly in a shell
- reads command and spits out the result
- matrix of monospaced text
- syntax: binary space arg1 space arg2 space ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Run Gitit Wiki | |
After=network-online.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/gitit --config-file /etc/gitit/gitit.conf | |
WorkingDirectory=/srv/gitit | |
User=gitit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LED_PATH="/sys/devices/platform/leds-gpio/leds" | |
GREEN="gl-connect:green:lan" | |
RED="gl-connect:red:wlan" | |
ssleep () { | |
head -c "${1}00000" /dev/zero > /dev/null | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# exit on first fail, die on unset variables, don't glob, pipes fail on first failure | |
set -euf -o pipefail | |
cd spb | |
git pull --force | |
make | |
rm -rf html | |
mkdir html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spb | |
# everything redirects to the HTTPS, non-www subdomain | |
# redirect http(s)://www to https:// | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl; | |
listen [::]:443 ssl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> /* printf, puts, putchar */ | |
#include <unistd.h> /* fork, execv */ | |
#include <sys/ioctl.h> /* get username */ | |
#include <sys/wait.h> /* join processes */ | |
#include <sys/types.h> /* pid_t */ | |
#include <string.h> /* strcpy, strncpy, memcpy */ | |
#define MAX_WIDTH 80 | |
#define MAX_CMD 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computers are great because they do exactly what they're told, very fast. But | |
sometimes, we need things done faster than a computer can do them. What can we | |
build that's faster than a computer? | |
If you want to work on something, it will be faster if your friend does one | |
part while you do another. Two people working on different things at the same | |
time are faster than one person doing everything alone. | |
Computers work the same way: If you can break up what you want the computer to | |
do into smaller things, and then get different computers to work on those |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from itertools import zip_longest | |
from os import chdir, environ, getcwd, makedirs | |
from pathlib import Path | |
from subprocess import CalledProcessError, check_call | |
from sys import argv, exit | |
def commits_from_file(filename): | |
with open(filename, 'r') as f: |