This file contains 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 | |
#this script sets up a git user, installs gitea, a systemd service, and an nginx subdomain redirect | |
#inspired by https://golb.hplar.ch/2018/06/self-hosted-git-server.html | |
DOMAIN=EXAMPLE.COM #Please put your actual domain here | |
GIT_HOME=/opt/git #/home/git in the above tutorial | |
GITEA_PORT=3000 #default, but you can change it | |
if [[ $EUID -ne 0 ]]; then | |
echo "you need to be root" | |
exit 1 |
This file contains 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> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <limits.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains 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/python | |
from time import sleep | |
import curses, curses.panel | |
COLUMNS=40 | |
ROWS=30 | |
side = 60 # < | |
top = 126 # ~ | |
bottom = 95 # _ |
This file contains 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/python3 | |
# See here for more info: https://www.reddit.com/r/opencalibre/comments/s72l4r/calishot_202201_find_ebooks_among_373_calibre/ | |
#https://calishot-eng-5.herokuapp.com/index-eng/summary.json?_search=Lilith%E2%80%99s+Brood+Octavia+Butler&_sort=uuid | |
#pip install pyfzf | |
from pyfzf.pyfzf import FzfPrompt | |
import requests, json | |
from pprint import pprint as p | |
MOBIS_ONLY = False | |
OUTPUT_DIRECTORY = '/home/raul/books2import/' |
This file contains 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 | |
#build kernel as debian package | |
MAJ=4 | |
MIN=13 | |
VER=11 | |
PATCH_DIR="/home/user/kernel-patches" | |
BUILD_DIR="/home/user/build/kernel" | |
mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} | |
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${MAJ}.${MIN}.${VER}.tar.gz | |
tar xvf linux-${MAJ}.${MIN}.${VER}.tar.gz |
This file contains 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 | |
#added kill function | |
#run as: | |
#./SCRIPTNAME.sh k | |
#to kill these spawned processes | |
# | |
#if you want to to be able to position your windows interactively: | |
#sudo apt-get -y install blackbox | |
#add this to the end of runvnc() | |
#blackbox -display :1 >/dev/null &>/devnull & |
This file contains 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 | |
set -e | |
cd /tmp | |
#get the sdcc master branch, make, and install to /opt/sdcc | |
git clone https://github.com/swegener/sdcc.git && cd sdcc | |
export CFLAGS=-static; export LDFLAGS=-static; | |
./configure --disable-mcs51-port --disable-z80-port --disable-z180-port --disable-r2k-port --disable-r2ka-port --disable-r3ka-port --disable-gbz80-port --disable-tlcs90-port --disable-ez80_z80-port --disable-z80n-port --disable-ds390-port --disable-ds400-port --disable-pic14-port --disable-pic16-port --disable-hc08-port --disable-s08-port --disable-pdk13-port --disable-pdk14-port --disable-pdk15-port --prefix=/opt/sdcc |
This file contains 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 <OSCBundle.h> | |
#include <SLIPEncodedSerial.h> | |
#include <OSCMessage.h> | |
SLIPEncodedSerial SLIPSerial(Serial); | |
// encoder stuff below vvvvv | |
#define MAXENCODERS 1 | |
volatile uint32_t encstate[MAXENCODERS]; | |
volatile uint32_t encflag[MAXENCODERS]; |
This file contains 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 | |
BINARY='htop' | |
SHLIB_DEST="usr/lib/$BINARY" | |
if [[ $UID != 0 ]] | |
then | |
echo "please run as root" | |
exit 1 | |
fi |
This file contains 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> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <linux/fb.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <sys/mman.h> | |
#include <inttypes.h> | |
#include <math.h> | |
#include "lo/lo.h" |
NewerOlder