Skip to content

Instantly share code, notes, and snippets.

View iamvinny's full-sized avatar
🏠
Working from home

Vinny iamvinny

🏠
Working from home
View GitHub Profile
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@jctosta
jctosta / screen_cheatsheet.markdown
Last active November 17, 2024 08:18
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@gtomitsuka
gtomitsuka / main.js
Created July 21, 2015 16:52
toLower(str) - Alternative to String.prototype.toLowerCase(), written for a Quora answer.
function toLower(str){
var result = '';
for (var i = 0, len = str.length; i < len; i++) {
var charAtLocation = str.charCodeAt(i);
if(charAtLocation > 64 && charAtLocation < 91) //ASCII for upper-case
result += String.fromCharCode(charAtLocation + 32);
else
result += str[i];
}
return result;
@yakuter
yakuter / CryptoJS.js
Last active April 14, 2024 20:51
CryptoJS AES Example
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/core-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/sha256.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/enc-base64.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/pbkdf2.js"></script>
# see https://httptoolkit.tech/blog/chrome-android-certificate-transparency/
# put your Burp cacert.der in the current working directory!
FINGERPRINT=`openssl x509 -in cacert.der -inform der -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64`
echo "chrome --ignore-certificate-errors-spki-list=$FINGERPRINT" > chrome.sh
adb push chrome.sh /data/local/tmp/chrome.sh
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/chrome-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/android-webview-command-line
@Useems
Useems / index.ts
Created February 21, 2024 12:40
Facebook NodeJS encpass implementation
// @ts-ignore
import { default as nacl } from 'tweetnacl-sealedbox-js';
import { webcrypto } from 'crypto';
function decodeUTF8(str: string): Uint8Array {
if (typeof str !== "string")
throw new TypeError("expected string");
return new Uint8Array(unescape(encodeURIComponent(str)).split("").map(char => char.charCodeAt(0)));
}
@lewislarsen
lewislarsen / reverb-instructions.md
Last active September 1, 2024 17:34
Instructions for how to setup Laravel Reverb in Production.

Reverb Walkthrough

This guide covers configuring Laravel Reverb for production using services like Laravel Forge or Ploi.

1. Configuring Nginx

Add this to your nginx site configuration's server block:

location /app {