Skip to content

Instantly share code, notes, and snippets.

View sudojunior's full-sized avatar
:shipit:
It'll be fine, let it run. 💥

Junior sudojunior

:shipit:
It'll be fine, let it run. 💥
View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@sudojunior
sudojunior / config.json
Created August 16, 2017 08:54
Discord to IRC and back.
{
"token": "",
"irc": {
"channel": "",
"username": "",
"pass": ""
},
"discord": {
"guild": "",
"channel": ""
@sudojunior
sudojunior / README.md
Created April 12, 2018 20:55
A gist definition file based of Discord's Documentation, just more compatible with editors like VS and VSCode. (README.md Included)

Discord Documentation Definitions

Credits

First off, I would like to thank Discord for creating this documentation in the first place. You can find their documentation here.

Contact

@sudojunior
sudojunior / calcpi.js
Created March 15, 2019 12:38
Versions of calculating PI (where [x] ≒ [PI])
console.clear();
console.log('[Start]');
sqrt = Math.sqrt;
a = n = 1;
g = 1 / sqrt(2); z = 1 / 4; half = 1 / 2;
for(var i = 0; i < 30; i++) {
x = [(a + g) * half, sqrt(a * g)];
const Admin = require('./UserAdmin');
const Inventory = require('./UserInventory');
class User {
/**
* @param {string} id Primary key of record
*/
constructor(id) {
this.id = id;
this.data = {
@sudojunior
sudojunior / Router.py
Last active August 19, 2019 18:31
A python port of the router from discordjs/discord.js#1667
# Achieved in python 3.7.x (last tested in 3.7.2)
# A script port of discord.js@master router, partly accurate as of August 19th 2019
# https://github.com/discordjs/discord.js/pull/1667
# https://github.com/discordjs/discord.js/blob/master/src/rest/APIRouter.js
"""
Issues that remain in this method of manual proxy definition:
- Calling .prop or ['prop'] subsequently adds the query to the existing state.
Not that this is so much a problem as it is a solution,
but when running in a sandbox 1 mistake and the whole class trips on itself.
- Manual build method exists for compatibility purposes inside of a class context...
@sudojunior
sudojunior / Deque.js
Last active October 11, 2019 13:24
JavaScript ports of various python modules.
export class Deque {
constructor(iterable, maxLen = null) {
this.iterable = iterable;
this.maxLen = maxLen;
}
append(value) {}
appendLeft(value) {}
clear() {}
copy() {}
@sudojunior
sudojunior / argument_definitions.txt
Last active November 14, 2019 13:10
Minecraft 1.14.x Java Edition Commands List (using Unity-like argument definitions)
Vector3 = implement int[] as [x, y, z]
Target = ref file(./target_selector.txt)
Gamemode =
("survival" | "s") | // Survival
("creative" | "c") | // Creative
("adventure" | "a") | // Adventure
"spectator" // Spectator
@sudojunior
sudojunior / gitloghelp.txt
Created October 24, 2019 20:10
The summary of less commands for git (direct copy from cmd-line).
SUMMARY OF LESS COMMANDS
Commands marked with * may be preceded by a number, N.
Notes in parentheses indicate the behavior if N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------
# Get all files and folders in a directory (recurse, and map over)
Get-ChildItem -Recurse | Select-Object FullName
# ^, but directories only
Get-ChildItem -Recurse | ?{ $_.PSIsContainer } | Select-Object FullName