Skip to content

Instantly share code, notes, and snippets.

View No9's full-sized avatar
🦀
Rusting with a slight chance of code

Anton Whalley No9

🦀
Rusting with a slight chance of code
View GitHub Profile
@dmpe
dmpe / kickstart.cfg
Last active August 19, 2024 19:24
RHEL9/Rocky9 Kickstart file with CIS hardening generated by gitlab.com/kickstart-my-heart/rocky8
#version=RHEL9
# Kickstart for HeadlessCISPodman
# Version 9.2.1
# License agreement
eula --agreed
# Use non-interactive install
# (this has to be `cmdline` on RHEL 7)
@alanzeino
alanzeino / lldb-debugging.md
Last active May 29, 2024 03:18
LLDB debugging with examples

LLDB Debugging Cheat Sheet

Commands

LLDB Commands

LLDB comes with a great set of commands for powerful debugging.

help

Your starting point for anything. Type help to get a list of all commands, plus any user installed ones. Type 'help for more information on a command. Type help to get help for a specific option in a command too.

using reputation systems to create shared function-critical datastructures in open networks

Search engines, spam filtration, and p2p protocols - all need to rate the value of information. Search engines need it to provide good results; spam filtration needs it to exclude noise; and p2p networks need it for security and efficiency.

What is "value?" I'll use two dimensions:

  • Quality (how useful the information is). The more permissive participation is, the greater the need for quality-ranking. Term-frequency search alone fails for the Web, because the Web doesn't prefilter for quality.
  • Trust (how safe the information is to use). The more function-critical the information is, the greater the need for trust-ranking. If a DHT's host-lookup can be manipulated to flood an unsuspecting computer (a DDoS) then the DHT is unsound.
@acolyer
acolyer / service-checklist.md
Last active July 10, 2024 05:13
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@Stwissel
Stwissel / firsttest.js
Created April 16, 2014 15:46
POC for a filtering proxy, botched attempt
var httpProxy = require('http-proxy');
// Create an array of selects that harmon will process.
var actions = [];
var actionOne = {};
actionOne.query ='body';
actionOne.func = function (node) {
var out = '<h1>You have been proxied</h1>';
node.createWriteStream({ outer: true }).end(out);
console.log("body function called: " + out);
@clemensg
clemensg / curl_libuv_example.c
Last active November 2, 2023 01:48
An example on how to use libuv with libcurl's multi interface Should be equally fast on Unixes (uses epoll/kqueue/etc like libev/libevent) but MUCH faster on Windows due to libuv's usage of IO completion ports. Could come in handy if you have to manage several hundreds or thousands of connections!
#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
#include <curl/curl.h>
uv_loop_t *loop;
CURLM *curl_handle;
uv_timer_t timeout;
typedef struct curl_context_s {
@adamwdraper
adamwdraper / Node.js File Looper
Created December 5, 2012 04:46
Loop through all files in a given directory with node.js
var fs = require('fs');
var walkPath = './';
var walk = function (dir, done) {
fs.readdir(dir, function (error, list) {
if (error) {
return done(error);
}
@rockbot
rockbot / draft2.md
Created November 13, 2012 18:18
JSConf CFP

AI.js: Robots with Brains!

Once upon a time, there was a roboticist. She spent eight years working with robots of various shapes, sizes, and intelligence levels - her specialty was in planning and navigation algorithms (useful for driverless cars, rescue robots, etc.). Eager for some fresh air away from the lab, she switched gears and started developing a better Internet with JavaScript and Node.js.

In her time away, however, her little robot friends have also learned JavaScript! The likes of Johnny-Five and NodeCopter have breathed new life into those traditionally Python/C++-controlled machines, and our favorite roboticist's little vacation has come to a close.

Whereas 2012 was the start of moving, reactive robots programmed in JavaScript, 2013 will be the year of the smarter, autonomous robot! Task driven and data oriented, they will be the most intelligent JS robots you've ever seen - and they'll be the founders of the robot.js of tomorrow.

In this talk, we will discuss and review examples of

@No9
No9 / Harmon.js
Created May 28, 2012 21:11
A sample implementation of trumpet in nodejistsu http-proxy
var http = require('http'),
httpProxy = require('http-proxy'),
trumpet = require('trumpet');
httpProxy.createServer(
function (req, res, next) {
var _write = res.write;
res.write = function (data) {