Skip to content

Instantly share code, notes, and snippets.

Avatar
🏫
Focusing on college

rumblefrog rumblefrog

🏫
Focusing on college
View GitHub Profile
View rpi-traffic-visualizer.md

Abstract

A network of Raspberry Pi Zero W that interconnect via GCP and potentially deployed using Kubernetes, and could potentially incorporate some ML processing on stored traffic data.

These traffic data could be incorporated to display live heat-map for specific locations and nodes and the ability to create and predict future trends.

Infrastructure

Pi -> Redis? -> InfluxDB -> HTTP API -> Frontend

View fish.cpp
RefPtr<SourceFile>
SourceManager::createFromBuffer(ReportingContext& cc, UniquePtr<char[]> buffer, uint32_t length)
{
const char* path = "fish-glub-glub";
Atom* atom = strings_.add(path);
AtomMap<RefPtr<SourceFile>>::Insert p = file_cache_.findForAdd(atom);
if (p.found())
return p->value;
@rumblefrog
rumblefrog / iptables.py
Created Jul 21, 2019
Parses iptable logs
View iptables.py
import re
import fileinput
from collections import Counter
pair_re = re.compile('([^ ]+)=([^ ]+)')
portlist = []
iplist = []
for line in fileinput.input():
line = line.rstrip()
@rumblefrog
rumblefrog / tasks.json
Last active Aug 29, 2020
SourcePawn VSCode Task
View tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Compile plugin",
"type": "shell",
"presentation": {
@rumblefrog
rumblefrog / helix.js
Created Mar 28, 2019
Sophisticated Helix Antenna Design with matching Coax to 50 Ω
View helix.js
function mehrWind() { x = document.generator.n.value * 1; x = x + 1 ; document.generator.n.value = x.toFixed(0) ; rechnen();}
function wenigerWind() { x = document.generator.n.value * 1; x = x - 1 ; if (x<1) x=1; document.generator.n.value = x.toFixed(0) ; rechnen();}
function mehrCond() { x = document.generator.d4.value * 1; x = x + 0.1 ; document.generator.d4.value = x.toFixed(2) ; rechnen();}
function wenigerCond() { x = document.generator.d4.value * 1; x = x - 0.1 ; if (x<0.1) x=0.1; document.generator.d4.value = x.toFixed(2) ; rechnen();}
function rechnen()
{
var freq;
freq = document.generator.freq.value * 1;
@rumblefrog
rumblefrog / channelsorter.go
Created Feb 18, 2019
Sort Discord channels (category, text, voice) in an one dimension array
View channelsorter.go
package channelsorter
import (
"sort"
"github.com/rumblefrog/discordgo"
)
type ChannelGeneric struct {
Underlying *discordgo.Channel
View dynamic json.go
func dynamicUnmarshal(text string) ([][]interface{}, error) {
var data [][]json.RawMessage
if err := json.Unmarshal(text, &data); err != nil {
return nil, err
}
result := make([][]interface{}, len(data))
for i, _ := range result {
result[i] = make([]interface{}, len(data[i]))
@rumblefrog
rumblefrog / README.md
Last active May 27, 2018
Steam Spring Cleaning AppID Simulator
View README.md

Installation

  1. Put these two files in the same directory
  2. Run yarn or npm install
  3. Update the accountName and password on line 11 and 12

Usage

  1. Run node index in that directory
  2. Enter Steam Guard Code (If prompted)
@rumblefrog
rumblefrog / README.md
Last active Jan 27, 2018
Sourcebans++ Blacklist Coloring Visual Only
View README.md

Usage

To use this patch, simply insert & replace accordingly, when patched you may include the word blacklist anywhere in the reason for it to activate.

View sbpp_sleuth.sp
// *************************************************************************
// This file is part of SourceBans++.
//
// Copyright (C) 2014-2016 SourceBans++ Dev Team <https://github.com/sbpp>
//
// SourceBans++ is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, per version 3 of the License.
//
// SourceBans++ is distributed in the hope that it will be useful,
You can’t perform that action at this time.