Skip to content

Instantly share code, notes, and snippets.

View Normanras's full-sized avatar

Norm Normanras

View GitHub Profile
@LaurenceJJones
LaurenceJJones / crowdsec-lights.sh
Last active June 12, 2023 19:31
crowdsec lights
#!/bin/bash
### Prequesites
## jq curl
###
### Variables
LAPI="http://127.0.0.1:8080"
ORIGINS="crowdsec,cscli" ## Comma separated list of ORIGINS ## Dont include CAPI as capi will flush every 2 hours and will make your lights go wild
API_KEY=""
@qdm12
qdm12 / README.md
Last active April 14, 2024 19:11
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

@russfeld
russfeld / picam-stream.sh
Last active April 1, 2024 14:50
Stream Raspberry Pi Camera to Twitch
#!/bin/bash
# =================================================================
# Stream configuration file for Raspberry Pi Camera
#
# @author Russell Feldhausen (russfeldh@gmail.com)
# @version 2019-06-05
#
# This set of commands should allow you to stream video from your
# Raspberry Pi Camera to Twitch and Youtube (and possibly other
@william8th
william8th / .tmux.conf
Last active April 30, 2024 17:03
Tmux open new pane in same directory
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
set -g prefix C-space
unbind-key C-b
bind-key C-space send-prefix
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
@elktros
elktros / Raspberry_Pi_Stepper_Motor_L298N.py
Created February 16, 2018 05:49
Python Script for Controlling a 12V Bipolar Stepper Motor with Raspberry Pi and L298N Motor Driver Module.
import RPi.GPIO as GPIO
import time
out1 = 13
out2 = 11
out3 = 15
out4 = 12
i=0
positive=0
@styblope
styblope / docker-api-port.md
Last active May 6, 2024 14:00
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}