Skip to content

Instantly share code, notes, and snippets.

View comerford's full-sized avatar

Adam Comerford comerford

View GitHub Profile
@comerford
comerford / whw03v1.md
Last active March 19, 2024 14:37
Building OpenWRT for the WHW03 V1

making a recent build by cherry-picking from @protectivedad repo

This is a verbose, step-by-step-from-scratch account of how I built a version of OpenWRT for my Linksys Velop WHW03 V1 based off the 23.05.2 release and cherry picking in the changes from a reported working repo for the WHW03 V1

Build Environment Notes

For the build step I use a docker container, that is from here:

https://github.com/mwarning/docker-openwrt-build-env

Basically though, assuming you have docker working already it is:

@comerford
comerford / agones-udp-ping.py
Last active May 17, 2023 09:22
Python script to ping the Agones UDP ping endpoint and return the RTT
import socket
import time
import sys
# Set the default port
DEFAULT_PORT = 7000
# Set the number of iterations used to calculate an average
ITERATIONS = 3
@comerford
comerford / get-ue5-custom-s3.ps1
Created March 22, 2023 19:57
Public rclone wrapper
param(
[Parameter(Mandatory=$true)]
[string]$access_key,
[Parameter(Mandatory=$true)]
[string]$secret_key,
[string]$path="c:\unreal-5.0"
)
# this asssumes that the custom UE5 that you want to download is in an S3 bucket and is in a self-extracting archive (7zip or similar)
# for the last version built, 225GB is needed at least, but we might be re-running, so need to get the current amount downloaded and subtract if present
$driveInfo = Get-PSDrive -PSProvider 'FileSystem' | Where-Object { $_.Name -eq $path[0] }
@comerford
comerford / mongo-rocks-startup.log
Last active August 29, 2015 14:18
Mongo Rocks Startup
./mongod --storageEngine=rocksdb
2015-04-03T19:09:38.983+0100 I STORAGE Compression: snappy
2015-04-03T19:09:38.983+0100 I STORAGE MaxWriteMBPerSec: 1024
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] MongoDB starting : pid=16433 port=27017 dbpath=/data/db 64-bit host=fed-vm
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] ** NOTE: This is a development version (3.1.1-pre-) of MongoDB.
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten] ** Not recommended for production.
2015-04-03T19:09:39.042+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.043+0100 I CONTROL [initandlisten]
2015-04-03T19:09:39.043+0100 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
@comerford
comerford / mm-standalone.conf
Last active March 23, 2021 08:57
Config Files for MongoDB 3.0 Compression Testing
storage:
dbPath: "/data/db/300-mm"
directoryPerDB: true
journal:
enabled: true
systemLog:
destination: file
path: "/data/db/300-mm/mongodb.log"
logAppend: true
timeStampFormat: iso8601-utc
@comerford
comerford / oidtest.js
Created December 18, 2014 12:49
Testing ObjectId Snippet
// start a mongo shell to act as a JS interpreter (no db connection required)
mongo --nodb
// store sample id in a variable
var id = new ObjectId("533bc0f60015a0a814000001");
// print out the variable
> id
ObjectId("533bc0f60015a0a814000001")
// try some methods
id.getTimestamp()
ISODate("2014-04-02T07:49:10Z")
@comerford
comerford / timed_ex_explain.js
Created November 17, 2014 18:16
Timed explain with execution for MongoDB 2.8
// the start/end is not really needed since explain contains timing information
// but, this is useful for comparison with other commands (touch) which do not have such info
var start = new Date().getTime();
db.data.find().explain("executionStats")
var end = new Date().getTime();
print("Time to touch data: " + (end - start) + "ms");
@comerford
comerford / mongo_mmap.conf
Last active August 29, 2015 14:09
YAML Config for MongoDB 2.7.9 - mmap v1
storage:
dbPath: "/ssd/db/mmap"
engine: "mmapv1"
systemLog:
destination: file
path: "/data/mmap/mongodb.log"
processManagement:
fork: true
@comerford
comerford / mongo_wt_none.conf
Last active August 29, 2015 14:09
YAML Config for MongoDB 2.7.9 - WiredTiger, compression disabled
storage:
dbPath: "/ssd/db/wt_none"
engine: "wiredTiger"
wiredTiger:
collectionConfig: "block_compressor="
systemLog:
destination: file
path: "/data/wt_none/mongodb.log"
processManagement:
fork: true
@comerford
comerford / mongo_wt_zlib.conf
Last active January 9, 2017 12:08
YAML Config for MongoDB 2.7.9 - WiredTiger, zlib compression
storage:
dbPath: "/ssd/db/wt_zlib"
engine: "wiredTiger"
wiredTiger:
collectionConfig: "block_compressor=zlib"
systemLog:
destination: file
path: "/data/wt_zlib/mongodb.log"
processManagement:
fork: true