Skip to content

Instantly share code, notes, and snippets.

View ADRFranklin's full-sized avatar
😎
Working with Go/Rust and JS/TS

JustMichael ADRFranklin

😎
Working with Go/Rust and JS/TS
  • Leicestershire, UK
View GitHub Profile
@AmyrAhmady
AmyrAhmady / sidebars.js
Last active March 7, 2021 11:36
Docusaurus sidebar generator by name of directories and files!
const fs = require("fs");
const path = require('path');
const SIDE_BAR_NAME = 'Sidebar';
const CATEGORY_NAME_CAPITALIZATION = true;
function parseDir(filename) {
const stats = fs.lstatSync(filename);
const info = {}
#if defined _INC_if_extract
#endinput
#endif
#define _INC_if_extract
/*
88888888888 88
88 88
88 88
# 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

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents