Skip to content

Instantly share code, notes, and snippets.


Edaz edazpotato

View GitHub Profile
jagregory / gist:710671
Created Nov 22, 2010
How to move to a fork after cloning
View gist:710671
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork

I do not maintain this list anymore:

Go to an updated version

Performance Mods

A list of performance-enhancing mods for most major-played versions.

Any suggestion/complaint?
~ Ping alkya#1273 in Modded Minecraft or use the gist comments.

Mods marked as "Dangerous" might be unstable, and cause some unexpected behaviour.

EvieePy /
Last active Jun 27, 2022
Simple Error Handling for ext.commands -
If you are not using this inside a cog, add the event decorator e.g:
async def on_command_error(ctx, error)
For examples of cogs see:
For a list of exceptions:
View GitHub spoiler


Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
amishshah /
Created Oct 22, 2021
tl;dr i'm stepping down as owner of discord.js!

Hello! I'm Amish (also known as hydrabolt), and I am the creator of discord.js.

I created discord.js as a hobby/learning project for myself in August 2015 while I was still a teenager in school.

More than 6 years later, discord.js has become more popular than I could ever imagine, and I cannot express how grateful I am to the other contributors and the community for this amazing experience.

A few of my favourite highlights include:

  • The countless voice rewrites (I think we're done with that now 😉)
  • The April Fools' traditions
msrose /
Last active Jun 16, 2022
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

EvanHahn / gist:2587465
Last active Jun 9, 2022
Caesar shift in JavaScript
View gist:2587465
JavaScript Caesar shift
by Evan Hahn (
"Encrypt" like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And "decrypt" like this:
oze4 / v-cloak.css
Created Feb 9, 2019
v-cloak for vue.js loading
View v-cloak.css
[v-cloak] {
display: block;
padding: 50px 0;
@keyframes spinner {
to {
transform: rotate(360deg);
RoccoDev /
Last active Feb 19, 2022
Minecraft SHA-1 complement hash calculation in Rust
// Copyright (C) 2019 RoccoDev
// Licensed under the MIT license.
// <>
// Bench results:
// First hash: 152ms
// Second hash: 1ms
// Third hash: 0ms
extern crate crypto; // Tested with 0.2.36
alexdiliberto / get_random_bytes.js
Created Feb 25, 2016
Get random bytes in Javascript (Browser/Node)
View get_random_bytes.js
let getRandomBytes = (
(typeof self !== 'undefined' && (self.crypto || self.msCrypto))
? function() { // Browsers
var crypto = (self.crypto || self.msCrypto), QUOTA = 65536;
return function(n) {
var a = new Uint8Array(n);
for (var i = 0; i < n; i += QUOTA) {
crypto.getRandomValues(a.subarray(i, i + Math.min(n - i, QUOTA)));
return a;