Skip to content

Instantly share code, notes, and snippets.

View ryancdotorg's full-sized avatar

Ryan Castellucci ryancdotorg

View GitHub Profile
Copyright© Technovelgy LLC; all rights reserved.
Name Purpose Author (Publication Date) Category
Andy - an artificial human A slang term for "android" - an artificially created humanoid being. Philip K. Dick (1968) ai
Autobutle An automated servant. Frank Herbert (1972) ai
Automaton Chessplayer - the first chess-playing computer The first chess-playing computer. Ambrose Bierce (1910) ai
Automonk A robot with an AI trained on an individual monk. Ray Naylor (2022) ai
Ava - she wants to be taught A piece of learning software. Amitav Ghosh (1995) ai
Bard A machine that invents randomized stories and can read them out loud or animate them for viewing. Isaac Asimov (1956) ai
Bendix Anxiety Reducer Machine-based psychotherapy. Robert Sheckley (1956) ai
Big Computer - wide-screen Jehovah Just like it says; this computer knows it all. John Varley (1983) ai
@epixoip
epixoip / sshd_config.diff
Created April 10, 2021 06:00
ssh pubkey auth only with libpam
--- /etc/ssh/sshd_config.orig 2021-04-10 05:50:44.673514864 +0000
+++ /etc/ssh/sshd_config 2021-04-10 05:59:56.316912290 +0000
@@ -31,7 +31,7 @@
# Authentication:
#LoginGraceTime 2m
-#PermitRootLogin prohibit-password
+PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
@dlenski
dlenski / cert_fingerprint_test.py
Last active February 26, 2024 09:05
Fingerprint-based certificate validation in Python (including pin-sha256)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# This is a demonstration of how to do fingerprint-based certificate
# validation in Python, in the style of OpenConnect:
# https://gitlab.com/openconnect/openconnect/-/blob/HEAD/library.c#L1084-1143
#
# For Python <3.7, we monkey-patch ssl.SSLSocket directly, because ssl.SSLContext.sslsocket_class
# isn't available until Python 3.7. For Python 3.7+, we set ssl.SSLContext.sslsocket_class
# to our modified version (which is sort of monkey-patching too).
@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active April 29, 2024 15:43
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@cemeyer
cemeyer / ⁄etc⁄logrotate.conf
Last active October 22, 2023 12:06
Sane logrotate.conf settings
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
compress
compresscmd /bin/zstd
compressext .zst
compressoptions -18 -T0 --rm
@chankruze
chankruze / Compile-Vanila.md
Last active October 21, 2024 16:07
How To Compile OpenWrt Firmware For Any Router

Checking out Source

  • clone latest source repository by git clone https://www.github.com/openwrt/openwrt -b branch_name
  • Now change directory to openwrt by cd openwrt.This is our <buildroot dir> for this guide.

Updating Feeds

  • Update feeds: ./scripts/feeds update -a
  • Make downloaded package(s) available in make menuconfig:
    • single package : ./scripts/feeds install <PACKAGENAME>
    • all packages : ./scripts/feeds install -a

Image Configuration

@BigNerd95
BigNerd95 / regd_diff.c
Last active March 1, 2023 09:05
Atheros Country Code ART bypass passing a custom Country Name when loading the driver (e.g.: insmod ath cn=AU)
char *user_country_name = ""; // [MOD]
module_param_named(cn, user_country_name, charp, S_IRUGO); // [MOD]
MODULE_PARM_DESC(cn, "Country Name"); // [MOD]
static int __ath_regd_init(struct ath_regulatory *reg)
{
struct country_code_to_enum_rd *country = NULL;
u16 regdmn;
if (!reg)
@mimoo
mimoo / erase_from_memory.h
Last active April 8, 2024 21:17
Include this file to get the `erase_from_memory` function that zeros memory. See https://www.cryptologie.net/article/419/zeroing-memory-compiler-optimizations-and-memset_s/
#ifndef __ERASE_FROM_MEMORY_H__
#define __ERASE_FROM_MEMORY_H__ 1
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdlib.h>
#include <string.h>
void *erase_from_memory(void *pointer, size_t size_data, size_t size_to_remove) {
#ifdef __STDC_LIB_EXT1__
memset_s(pointer, size_data, 0, size_to_remove);
@apsun
apsun / myalloc.c
Last active July 26, 2024 07:31
A simple C memory allocator
/*
* myalloc - a simplified reimplementation of glibc's malloc
*
* This allocator aims to follow in the spirit of the glibc implementation,
* but with simplicity as the main design goal, instead of efficiency or
* scalability. It uses a single free list instead of grouping blocks
* into buckets, and is not at all thread safe.
*
* Some assumptions made:
* - 2's complement, little endian, 8 bits per byte