Skip to content

Instantly share code, notes, and snippets.

View PeterJRiches's full-sized avatar

Pete Riches PeterJRiches

  • New Zealand
  • 02:28 (UTC +13:00)
View GitHub Profile

How to make a small tweak to free software

The target audience for this is people who are beginners at software engineering and using linux. A lot of the information here may be obvious or already known to you. The language involved is C but you do not need to know any C to read this tutorial. I used mg to write this blog post. I used vs code to edit the source code.

This post is also available on gopher://tilde.team:70/0/~river/tweak-free-software

If you use a piece of free software and it's 99% perfect but there's just this one thing it does that annoys the hell out of you.. you can in theory just fix it! Here's a look at what doing that is like. Hopefully it inspires you, or you pick up a could tricks on the way!

Step 0: Have a problem

@nishitm
nishitm / xss-webmail-fuzzer.py
Created August 14, 2020 07:11
XSS Webmail Fuzzer script
#!/usr/bin/python
"""
A script for testing webmail systems for cross-site scripting problems
muts / ryujin AT offsec.com v0.3
auth supported plain/ssl/tls
v0.3.2
- Fixed the xssAttacks.xml URL
/*
* Compile with -lxcb -lxcb-randr
*/
#include <stdio.h>
#include <stdlib.h>
#include <xcb/xcb.h>
#include <xcb/randr.h>
int main() {
@aguilarcarlos
aguilarcarlos / TipsForGit.md
Last active November 5, 2025 03:05
Fixing untracked files

Some tips for Git to Save your Life 👍

Rest branch to spefic commit or last commit

Firstly you need select th commit desired or simply reset the HEAD in current branch, (can check if you are in current branch using git branch.

git reset HEAD^ --hard // Or git reset +[commit]^ --hard

After that we need to force push doing this way:

@pavlov99
pavlov99 / deque.awk
Last active October 19, 2024 11:07
AWK data structures
function deque_init(d) {d["+"] = d["-"] = 0}
function deque_is_empty(d) {return d["+"] == d["-"]}
function deque_push_back(d, val) {d[d["+"]++] = val}
function deque_push_front(d, val) {d[--d["-"]] = val}
function deque_back(d) {return d[d["+"] - 1]}
function deque_front(d) {return d[d["-"]]}
function deque_pop_back(d) {if(deque_is_empty(d)) {return NULL} else {i = --d["+"]; x = d[i]; delete d[i]; return x}}
function deque_pop_front(d) {if(deque_is_empty(d)) {return NULL} else {i = d["-"]++; x = d[i]; delete d[i]; return x}}
function deque_print(d){x="["; for (i=d["-"]; i<d["+"] - 1; i++) x = x d[i]", "; print x d[d["+"] - 1]"]; size: "d["+"] - d["-"] " [" d["-"] ", " d["+"] ")"}
@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active July 15, 2025 05:22
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.