Skip to content

Instantly share code, notes, and snippets.

View khimaros's full-sized avatar
🕳️
breadboards and microcontrollers

khimaros khimaros

🕳️
breadboards and microcontrollers
View GitHub Profile
@andreasf
andreasf / nginx-ldapauthd
Last active January 29, 2017 05:35
nginx-ldapauthd: a backend for the nginx auth_request module
#!/usr/bin/env python
# -*- coding=utf8 -*-
"""
nginx-ldapauthd
===============
A backend for the nginx auth_request module.
* Listens on unix socket (SOCK_NAME) and authenticates users against LDAP
* Two modes:
[Unit]
Description=Disable WiFi Power Management
After=network-online.target
[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /usr/bin/iw dev wlp3s0 set power_save off
[Install]
@luzfcb
luzfcb / graph_pygame.py
Created May 3, 2014 05:13
simple graph manipulation with pygame
# coding: utf-8
# by Joao Bueno
from random import randrange, choice
import pygame
FR = 30
SIZE = 640, 480
BGCOLOR = (255,255,255)
NODECOLOR = (255,0,0)
NODESIZE = 10,10

Setting up RetroArch on Raspberry Pi 4 and building emulator cores

Guide for myself and others to get RetroArch running on the new Raspberry Pi 4 while projects like RetroPie get an image out for the rpi4.
Disclaimer: I am not an expert and this may not be the most optimal build possible, but it works.

Inspiration taken from:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@egonelbre
egonelbre / astar_nodequeue.go
Last active June 29, 2023 09:43
Go A* implementation
package astar
import "container/heap"
type NodeQueue []Node
func NewNodeQueue() NodeQueue {
return make(NodeQueue, 0, 1000)
}
@lategoodbye
lategoodbye / mainline_guide.md
Last active January 4, 2024 21:35
Raspberry Pi: How to cross-compile and use Mainline Kernel

Raspberry Pi: How to cross-compile and use Mainline Kernel

Notes on how to set up a new Ubuntu LTS x64 environment, how to build a recent Mainline Kernel and place it on a Raspberry Pi OS SD card.

Procedure

  1. Install tools needed:
$ apt install git make gcc g++ device-tree-compiler bc bison flex libssl-dev libncurses-dev python3-ply python3-git libgmp3-dev libmpc-dev
@FrankSpierings
FrankSpierings / README.md
Last active January 20, 2024 20:45
Linux Container Escapes and Hardening
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'