Skip to content

Instantly share code, notes, and snippets.

View Mafee6's full-sized avatar
πŸ“ˆ
Repositories.length++

Mafee7 Mafee6

πŸ“ˆ
Repositories.length++
  • Mafee7
  • Universe (Maybe Alien btw)
View GitHub Profile
@Mafee6
Mafee6 / miniprogress.js
Last active December 6, 2023 05:45
MiniProgressBoi - The Mini Progressbar implemenetation!
const k = (width, done, total) => {
let px = Math.floor((done / total) * width), // Find num
_s1 = "─",
_s2 = "━";
width - px < 0 ? px = width : null;
String.prototype.sfrep = function (rc) {
return Array.from(new Array(rc)).map(k => this.toString()).join("");
};
@Mafee6
Mafee6 / Buffer.js
Last active December 11, 2022 16:41
Buffer Port for Websites
(async function () {
let f = await (await fetch("https://cdn.jsdelivr.net/gh/ethereumjs/browser-builds/dist/ethereumjs-tx/ethereumjs-tx-1.3.3.min.js")).text(); let s = document.createElement("script"); s.src = URL.createObjectURL(new Blob([f+atob("Y29uc3QgeyBCdWZmZXIgfSA9IGV0aGVyZXVtanMuQnVmZmVyOwpCdWZmZXIuZnJvbSgiIik7IHRoaXMuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoImJ1ZmZlcmluaXQiKSk=")], {type: "application/javascript"})); s.id = "BufferAPI"; document.head.appendChild(s);
})()
// Emits Event "bufferinit" when initialized.
@Mafee6
Mafee6 / typer.js
Last active September 30, 2022 11:07
TypeyBoi - *Types for a long time..*
// {Token} shall be replaced with your discord token to make the code work.
// Do ctrl + shift + i / F12 to open devtools on your discord tab / app.
// Go to Three dots / extraoption (if the network tab isn't visible)
// Click on the "Network tab"
// Click on a request with "/api" in it.
// In Request Info: Go to "Request Headers", "Authorisation" and replace {Token} with your discord token (don't share your token with anyone and keep it safe!)
// [/!\] Do it at your own risk!! For Educational Purposes only. Harmless if used unabusively.
const token = "{Token}";
let cid = location.pathname.split("/")[3];
@Mafee6
Mafee6 / ImagePaste.async.js
Last active June 9, 2023 06:55
ImagePaste.js - Paste images and get its data url
let pasteImage = async () => {
return await new Promise(async (res, rej) => {
let k = await navigator.clipboard.read();
if(k.length < 1) return;
if(!k[0].types.includes("image/png")) {
rej({
result: null,
error: "The Clipboard Doesn't Include an Image."
});
const stringifyNum = (num, digits) => {
const stringnum = new String(num);
return `${"0".repeat(digits - stringnum.length)}${stringnum}`;
};
@Mafee6
Mafee6 / stylify.js
Last active March 28, 2022 05:55
Stylify.js - Converts *.css stylesheets into inline stylesheets! (v2)
(async () => {
let styles = [];
let stylesheetlinks = Array.from(document.head.querySelectorAll("link")).filter(l => {
if(l.getAttribute) {
if(l.getAttribute("rel") === "inline-stylesheet") return true;
}
});
stylesheetlinks.map(async p => {
styles.push(await (await fetch(p.href)).text());
@Mafee6
Mafee6 / stylify.js
Created March 27, 2022 19:46
Stylify converts your *.css file to a style attribute
(async () => {
const styleMap = await (await (fetch("/styles/stylemap.json"))).json();
let styles = [];
styleMap.map(async s => {
styles.push(await (await fetch(s)).text());
});
setTimeout(() => {
styles.map(s => {
let target = s.match(/^(.+) ?(?={(.?|\n|\r)+})/g).toString();
@Mafee6
Mafee6 / hackify.js
Created March 20, 2022 06:01
Make text in your website look like hackin
document.body.innerHTML = document.body.textContent.split("").map(x => x.charCodeAt().toString(16)).join(" "); document.body.style.setProperty("color", "lime", "important")
@Mafee6
Mafee6 / password.js
Last active March 16, 2022 06:03
Passwords 😳
/*
Mafee Passwords Gist
Credit: Mafee7
https://github.com/mafee6
*/
const password = (length) => {
var o = "";
for(let i = 0; i < length; i++) {
let r = Math.floor(Math.random() * 3);
@Mafee6
Mafee6 / uuid.js
Last active December 28, 2023 07:57
Mini UUID Generator
const uuid = (length, dashes) => {
var o = "";
for(let i = 0; i < length; i++) {
if(Math.floor(Math.random() * 2) == 0){
o += Math.floor(Math.random() * 10);
} else {
var l = "abcdefghijklmnopqrstuvwxyz".split("")[Math.floor(Math.random() * 25)]
if(Math.floor(Math.random() * 2) == 0){
o += l.toLowerCase();
} else {