Skip to content

Instantly share code, notes, and snippets.

Avatar

KemoNine mcrosson

View GitHub Profile
@nickbalch
nickbalch / Picture Frame photo slideshow Raspberry Pi Framebuffer working code
Last active Aug 7, 2020
Incomplete Picture Frame / Photo Slideshow Python code for Raspberry Pi and Touchscreen Display using Framebuffer.
View Picture Frame photo slideshow Raspberry Pi Framebuffer working code
import os
import stat
import pygame
import time
import random
# https://learn.adafruit.com/pi-video-output-using-pygame/pointing-pygame-to-the-framebuffer
drivers = ['directfb', 'fbcon', 'svgalib']
background = (255,255,0)
@lizthegrey
lizthegrey / attributes.rb
Last active Oct 23, 2021
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active Oct 19, 2021
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@adam-p
adam-p / Local PR test and merge.md
Last active Oct 21, 2021
Testing a pull request, then merging locally; and avoiding TOCTOU
View Local PR test and merge.md

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: https://github.com/Psiphon-Labs/psiphon-tunnel-core/pull/37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37