Sometimes, I would build random things just for fun. So I was wondering what other people have made just for joy when they are bored. Recently, out of curiosity, I hunt down all weird, funny Github repos to see what people build just for fun.
1. Ohshitgit
I have to admit that the number of times I have to do a hard reset is a lot. Git is easy to use, and it is also easy to stuff things up, especially when you are new to Git. The repo is inspired by a great website that I usually visit when I did something wrong with Git.
whatthefoo / ohshitgit
⁉️Oh shit! A cli tool to help you unfuck your git mistakes
A cli tool to help you unfuck your git mistake.
Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible.
Install
npm install -g ohshitgit
Usage
Once that's done, you can run this command inside your project's root directory:
ohshit
That's it!
Inspired by
Katie Sylor-Miller's awesome webpage Oh Shit Git!
Author
Leif Riksheim (@leifriksheim) - WTFoo
2. Fuckitjs
This is hands-down the funniest Javascript repo I have ever found on Github. Base on the Readme, Fuckitjs will try to evaluate your Javascript code and slice all lines of code that contains errors. I'm sure this would be an excellent thing for error-free codebase by removing all. I think I can use Fuckitjs for April fool for my next prank.
mattdiamond / fuckitjs
The Original Javascript Error Steamroller
FuckItJS
Javascript Error Steamroller
FuckItJS uses state-of-the-art technology to make sure your javascript code runs whether your compiler likes it or not.
Technology
Through a process known as Eval-Rinse-Reload-And-Repeat, FuckItJS repeatedly compiles your code, detecting errors and slicing those lines out of the script To survive such a violent process, FuckItJS reloads itself after each iteration, allowing the onerror handler to catch every single error in your terribly written code.
Installation
- Include jQuery, because everything requires jQuery
- Include "fuckit.js"
- The End
API
FuckIt(path_to_your_shitty_script_file)
This will keep evaluating your code until all errors have been sliced off like mold on a piece of perfectly good bread Whether or not the remaining code is even worth executing, we don't know. We also don't particularly care.
FuckIt returns a promise that will be resolved once your godforsaken code actually makes it to the finish line. You can use this…
I'm sure that if I start using it, Fuckitjs will probably skip all my code.
3. Bearfondle
Bearfondle is used for decode and encode a string based on the weird part of JavaScript. Recommended for April Fool.
MrTarantula / beardfondle
({}+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+({}+[])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+({}+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+({}+[])[!+[]+!+[]+!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]
beardfondle
Inspired by WTFJS. This library extends String.prototype
to encode and decode strings.
How to Use
//JavaScript
var bf = require('beardfondle');
//TypeScript
import bf = require('beardfondle');
var foo = 'Noodle ocelot';
var bar = foo.beard();
console.log(bar);
// (+{}+[])[+[]]+({}+[])[+!+[]]+({}+[])[+!+[]]+([][[]]+[])[+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+({}+[])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+({}+[])[+!+[]]+({}+[])[!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+({}+[])[+!+[]]+(!![]+[])[+[]]
var baz = bar.fondle();
console.log(baz);
// Noodle ocelot
String.fondle()
is not needed to decode the library. Just open any browser console and type console.log((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+({}+[])[!+[]+!+[]]+([][[]]+[])[+!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+({}+[])[+!+[]])
. Through the magic of JavaScript you will get a string back.
NOTE: String.fondle()
does not simply decode they symbols back to characters. The method is a wrapper for eval()
with some basic checks to prevent malicious use. DO NOT USE THIS LIBRARY IN PRODUCTION. eval()
IS ALMOST NEVER SAFE.
The individual symbols can be accessed…
4. Frybits-wtf
This repo is exclusively for Kotlin but I like how the author is sicked of getting the common error message. In case you didn't know, this should not be used in production.
pablobaxter / frybits-wtf
Why throw an exception when you can throw other things?
Frybits WTF ಠ_ಠ
Are you tired of JVMs crap? Done with handling some meaningless NullPointerException
? Tired of throwing some other lame ass exception because somehow someone got your code in a state it never should have gotten into?
Take a deep breath, and let me introduce the Frybit WTF exception library (exclusively for Kotlin)!
(っ˘▽˘)っ Usage
⊂(◕。◕⊂)
Let's start of with something simple... feel like flipping that desk of yours? Whoa! Wait, no... don't really do it. Let's do it in code instead:
fun someDamnFunction() {
// Some damn code
// Suddenly, an error appears out of nowhere!
throw `┳━┳`
// Throwable message: "(┛ಠ_ಠ)┛彡┻━┻"
}
Easy, no? Oh... you hate the ASCII stuff? Just calm down there and breath. We can do this instead:
fun someDamnFunction() {
// Some damn code
// Suddenly, an error appears out of nowhere!
throw TheDamnTable
// Throwable message: "(╯°□°)╯︵ ┻━┻"
}
…
5. Brototype 👉🏼 link
Bro do you even code?
Accessing a nesting object will include a lot of null checks which makes the code ugly. So Brototype is used to access nested field inside an object. The downside of this package is that it is too funny for production use.
if(Bro(object).doYouEven('lift') === Bro.TOTALLY) {
console.log(object.lift);
}
// Calling nested functions if present
Bro(object)
.iDontAlways('goToGym')
.butWhenIdo(function(isGymClosed) {
console.log('The gym is closed: ', isGymClosed);
});
letsgetrandy / brototype
Bro, do you even?
brototype
Bro, do you even javascript?
Features
You've got a deeply-nested set of objects that may or may not always be there
We've all seen something like this
var myURL = app.config.environment.buildURL('dev');
which leads to one of our favorite javascript errors
error: undefined is not a function
And the solution only makes the code base ugly:
var myURL;
if (app && app.config && app.config.environment && app.config.environment.buildURL) {
myURL = app.config.environment.buildURL('dev');
}
We all hate that, don't we?
So what if you could just type:
var myURL;
if (Bro(app).doYouEven('config.environment.buildURL')) {
myURL = app.config.environment.buildURL('dev');
}
Or better yet, how about:
var myURL;
Bro(app
…6. Fartscroll
Warnings: This is not recommended to use this for your personal website. This will inject a fart noise to your page. Every time you scroll, it will play that sound based on how many pixels you have scrolled.
// Fart every 1 pixels scrolled - Don't do this
fartscroll(1);
theonion / fartscroll.js
You want fart noises as you scroll? We've got you covered.
fartscroll.js
Everyone farts. And now your web pages can too.
Now with 100% less jQuery! (Sorry, jQuery, we still love you)
Setup:
- Include "fartscroll.js" in your page. (You can use the latest from our CDN: //code.onion.com/fartscroll.js)
- Initialize the fartscroll plugin once the DOM has loaded:
// Fart every 400 pixels scrolled
fartscroll();
// Fart every 800 pixels scrolled
fartscroll(800);
More info at http://theonion.github.io/fartscroll.js/.
Thanks
Comment bellow if you found any fun, weird Github repo. Stay safe and stay home.
Top comments (0)