Skip to content

Instantly share code, notes, and snippets.

View ajmeese7's full-sized avatar
๐Ÿ™Š

Aaron Meese ajmeese7

๐Ÿ™Š
View GitHub Profile
@ajmeese7
ajmeese7 / install-rtl8188eu-on-zorin-os.sh
Created May 17, 2022 00:42
Guide from Zorin OS support on how to update to the latest wifi drivers
sudo apt-get update
sudo apt-get install make gcc linux-headers-$(uname -r) build-essential git dkms
git clone https://github.com/lwfinger/rtl8188eu.git
cd rtl8188eu
make all
sudo make install
@ajmeese7
ajmeese7 / fake-cat.sh
Last active May 17, 2022 00:08
Allows the contents of a file to be viewed without any fancy commands like `cat` or `less`, it only requires `echo`
alias cat='_cat(){ echo "$(<$1)";}; _cat'
@ajmeese7
ajmeese7 / reset.sh
Created May 12, 2022 22:36
Hard reset a git repo
#!/bin/bash
git fetch --all
git reset --hard origin/master
@ajmeese7
ajmeese7 / getProxyList.sh
Created April 30, 2022 20:02
Use Guzzle proxy in PHP
curl https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/http.txt -o proxyList.txt
@ajmeese7
ajmeese7 / iFrame.js
Created April 25, 2022 19:33
Pass stringified functions to iFrame and use them
/** Modified from https://stackoverflow.com/a/26917987/6456163 */
String.prototype.parseFunction = function () {
/** Removes inline comments, courtesy of https://www.regextester.com/93742 */
const strippedOfComments = this.replace(/[^:]\/\/.*/g, '');
const funcReg = /function *\(([^()]*)\)[ \n\t]*{(.*)}/gmi;
const match = funcReg.exec(strippedOfComments.replace(/(\n|\t)/g, ''));
// If the passed string is somehow not a function
if (!match) return null;
@ajmeese7
ajmeese7 / index.css
Created March 23, 2022 19:45
Static animation in CSS
@keyframes static {
0% {
transform: translateX(-1000px);
}
33% {
transform: translateY(-1000px);
}
66% {
did:3:kjzl6cwe1jw1496p6mu2si9t1s6q1uyyez90t4irl7l2hng5rpfh3prchm18xk2
// Set console.log to log to a file, for easy debugging of large amounts of data;
// https://stackoverflow.com/a/33898010/6456163
const fs = require('fs');
const util = require('util');
const logFile = fs.createWriteStream('console.log', { flags: 'w' });
var logStdout = process.stdout;
console.log = function () {
logFile.write(util.format.apply(null, arguments) + '\n');
logStdout.write(util.format.apply(null, arguments) + '\n');
}
/*
Please write a function that adds two large numbers represented by a string , such that the output is not expressed in scientific notation.
*/
function add(a, b) {
let aNums = breakIntoManageableParts(a);
let bNums = breakIntoManageableParts(b);
let remainder = 0, bigSum = "";
while (aNums.length > 0 || bNums.length > 0) {

Keybase proof

I hereby claim:

  • I am ajmeese7 on github.
  • I am ajmeese7 (https://keybase.io/ajmeese7) on keybase.
  • I have a public key ASCBYacYo9geS14d88Hv0dxuWLh6nuPu5ZQPYTKemTKKhQo

To claim this, I am signing this object: