Skip to content

Instantly share code, notes, and snippets.

View xetrics's full-sized avatar

Nate xetrics

View GitHub Profile
@xetrics
xetrics / vigineresquare.php
Last active March 28, 2016 20:14
Vigenère Square PHP Array
<?php
//a little less then 10k key strokes later, this master peice:
$square = array(
"a" => array("a" => "a", "b" => "b", "c" => "c", "d" => "d", "e" => "e", "f" => "f", "g" => "g", "h" => "h", "i"=> "i", "j" => "j", "k" => "k", "l" => "l", "m" => "m", "n" => "n", "o" => "o", "p" => "p", "q" => "q", "r" => "r", "s" => "s", "t" => "t", "u" => "u", "v" => "v", "w" => "w", "x" => "x", "y" => "y", "z" => "z"),
"b" => array("a" => "b", "b" => "c", "c" => "d", "d" => "e", "e" => "f", "f" => "g", "g" => "h", "h" => "i", "i"=> "j", "j" => "k", "k" => "l", "l" => "m", "m" => "n", "n" => "o", "o" => "p", "p" => "q", "q" => "r", "r" => "s", "s" => "t", "t" => "u", "u" => "v", "v" => "w", "w" => "x", "x" => "y", "y" => "z", "z" => "a"),
"c" => array("a" => "c", "b" => "d", "c" => "e", "d" => "f", "e" => "g", "f" => "h", "g" => "i", "h" => "j", "i"=> "k", "j" => "l", "k" => "m", "l" => "n", "m" => "o", "n" => "p", "o" => "q", "p" => "r", "q" => "s", "r" => "t", "s" => "u", "t" => "v", "u" => "w", "v" => "x", "w" => "
@xetrics
xetrics / sha256.cpp
Created November 30, 2016 16:43
C++ SHA256 Implementation (I did not make this :u)
#include <cstring>
#include <fstream>
#include "sha256.h"
const unsigned int SHA256::sha256_k[64] = //UL = uint32
{0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
#include <node.h>
#include <windows.h>
#include <TlHelp32.h>
#include <vector>
#include "pattern.h"
#include "memoryjs.h"
#include "process.h"
#include "memory.h"
#define INRANGE(x,a,b) (x >= a && x <= b)
@xetrics
xetrics / bot.js
Created May 7, 2017 19:24
discord image bomb
const Discord = require("discord.js")
const fs = require("fs")
const path = require("path")
if(process.argv.length <= 3) {
console.log(`Usage: ${__filename} DISCORD_TOKEN /path/to/shibes`)
return
}
const bot = new Discord.Client()
@xetrics
xetrics / fibbonacci_sphere.cs
Last active June 5, 2022 01:13
Unity Fibonacci Sphere Generation
List<Vector3> FibonacciSphere(int samples) {
List<Vector3> list = new List<Vector3>();
float phi = Mathf.PI * (3f - Mathf.Sqrt(5f));
for(int i = 0; i < samples; i++) {
float y = 1f - (i / (float)(samples - 1)) * 2f;
float r = Mathf.Sqrt(1f - y * y);
float theta = phi * i;
{
"printWidth": 100,
"singleQuote": false,
"useTabs": false,
"tabWidth": 4,
"semi": true,
"bracketSpacing": true,
"bracketSameLine": true,
"arrowParens": "always",
"trailingComma": "none"
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 30,
"spacing": 22,
"modules-left": ["wlr/workspaces"],
{
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {