Skip to content

Instantly share code, notes, and snippets.

View spacemud's full-sized avatar
👨‍⚕️

spacemud

👨‍⚕️
View GitHub Profile
@SteffenBlake
SteffenBlake / gist:93d442c0413425112e17de8e13642215
Last active September 24, 2024 13:41
Security Camera handy links

Cheap gear to get the job done

  1. Reolink PoE 5MP RLC-522 - https://www.amazon.ca/gp/product/B01AL5D85W/ref=ppx_yo_dt_b_asin_title_o06_s00
  2. Mokerlink 1 to 4 port PoE switch - https://www.amazon.ca/MokerLink-Ethernet-Support-IEEE802-3af-Fanless/dp/B07SGBQNLM/ref=sr_1_4
  3. (Kind of works) Raspberry Pi 4 - https://www.amazon.ca/CanaKit-Raspberry-Starter-Kit-4GB/dp/B07WRMR2CX/ref=sr_1_4 3a. (Recommended) Nanopi R4S (Way better performance but likely has to ship from China, but it is the far superior device for same price)
  4. Recommended: Also get yourself a USB 3.0 portable hard drive, preferably 2TB+, of your preferred brand

Also likely needed:

@BigETI
BigETI / keys.pwn
Created October 27, 2020 18:25
Helper function to check key states in PAWN
bool:AreKeysDown(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) != keys) && ((newKeys & keys) == keys);
}
bool:AreKeysUp(keys, oldKeys, newKeys)
{
return ((oldKeys & keys) == keys) && ((newKeys & keys) != keys)
}
@Vince0789
Vince0789 / rules.v4
Last active August 13, 2024 11:39 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
#define INVALID_DIALOG_ID (cellmin)
static stock
gPrev[MAX_PLAYERS] = { INVALID_DIALOG_ID, ... },
gCur[MAX_PLAYERS] = { INVALID_DIALOG_ID, ... },
bool:gOPDR = true;
hook function ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[])
{
gCur[playerid] = dialogid;
# create a new chain
iptables -N SAMPQUERY
# check that incomming packet is a samp query packet and divert to the new chain
# this inserts the rule as the first in the chain, but should probably be a bit further down (e.g. after checking lo interface)
iptables -I INPUT -p udp \! -f -m udp --dport 7777 -m conntrack --ctstate NEW,ESTABLISHED -m u32 --u32 "0x0>>0x16&0x3c@0x8=0x53414d50" -j SAMPQUERY
# only allow connection from ephemeral source ports
# connection attempts from ports outside this range are likely rogue clients
iptables -A SAMPQUERY -p udp --sport 49152:65535 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
// https://play.golang.org/p/5p28UL4thc_r
package main
import "fmt"
func main() {
s := InitializeServices() // Inject *sql.DB here
s.CreateAuthor(0, "name", "[email protected]") // Example http/grpc/graphql endpoints
@Southclaws
Southclaws / .gitlab-ci.yml
Created December 16, 2018 22:33
sampctl+gitlab=ci/cd 🎉
build:
image:
name: southclaws/sampctl:latest
entrypoint: [""]
tags: [pawn]
artifacts:
paths:
- gamemodes/barp.amx
cache:
paths:
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 19, 2024 20:57
crack activate Office on mac with license file
@mikejoh
mikejoh / docker-dhcpd.md
Last active November 10, 2024 09:08
Short guide on how to set up a Docker container as a DHCP server

Setting up a Docker container as a DHCP server

In this guide I’ve tested a number of different commands and configurations using Docker to run a container with dhcpd (+macvlan driver) to serve my clients in my home network. In the end i’ll migrate from my Windows 2012 R2 Server running DHCP to a much more lightweight Docker container (7.42 MB in total). Wow.

My home environment:

  • Firewall (Juniper)
    • I’m running IP helper for bootp which in this case means that i relay DHCP requests from various VLANs into one where i've placed my Windows 2012 R2 server. This is also where my container will live. See the FW configuration below:
@Vince0789
Vince0789 / bipltool-batch.py
Last active January 30, 2019 21:22 — forked from blewert/bipltool-batch.py
An IPL decompiler for binary IPL data files for gta:sa.
## Benjamin Williams
## <[email protected]>
## --
## bipltool.py/pyc
import os
import sys
import struct
import math