Skip to content

Instantly share code, notes, and snippets.

View lxhom's full-sized avatar
🦀
fighting with the borrow checker

lxhom lxhom

🦀
fighting with the borrow checker
  • Germany
  • 15:45 (UTC +02:00)
View GitHub Profile
514066306
@lxhom
lxhom / infuriating.url
Last active June 30, 2021 07:20
Type "j" in your browser URL bar and paste this snippet.
avascript:setInterval(()=>document.querySelectorAll("span, p, h1, h2, h3, h4, h5, h6, a").forEach(e=>{e.style.transform="rotate(0.5deg)"; e.style.display = "inline-block"}), 200)
@lxhom
lxhom / scratch-18f2ab.js
Created May 27, 2021 16:13
just a simple demo for async in for loops
let { Toggle } = require("enquirer")
let main = async () => {
let questions = ["Are you 18 or older?", "Do you agree to your data being shared with 3rd parties?", "Do you" +
" accept our ToS?"];
let answers = {enabled: "Yes", disabled: "No"}
let values = []
for (let question of questions) {
values.push(await new Toggle({
message: question,
@lxhom
lxhom / uwu_2.js
Created May 9, 2021 17:09
ass (doesnr work in a REPL, use eval() or write it into a file)
(! [] +[ ])
[+ !+ [] ]+ (! []
+[ ]) [! +[ ]+ !+ []
+! +[ ]] +( ![ ]+ []
)[!+[ ]+!+ []+ !+[]]
@lxhom
lxhom / uwu.js
Created May 9, 2021 16:41
fuck
(((((((( (((((((((((((((( (((((((((((((((( ((((((((
(((((((( (((((((((((((((! []+[])[!+[]+!+[] ]+((+[])
[([][(![ ]+[])[+[]]+(![]+ [])[!+[]+!+[]]+( ![]+[])[
+!+[]]+( !![]+[])[+[]]]+[ ])[!+[]+!+[]+!+[ ]]+(!![]
+[][(![ ]+[])[+ []]+(![ ]+[]) [!+[]+! +[]]+(! []+[])[
+!+[]]+ (!![]+[ ])[+[]] ])[+!+[ ]+[+[]] ]+([][[ ]]+[])[
+!+[]]+ (![]+[] )[!+[]+ !+[]+!+[] ]+(!![] +[])[+[ ]]+(!![
]+[])[+ !+[]]+( [][[]]+ [])[+[]]+([ ][(![]+ [])[+[] ]+(![]+
[])[!+[ ]+!+[]] +(![]+[ ])[+!+[]]+(!! []+[])[ +[]]]+[ ])[!+[]
+!+[]+! +[]]+(! ![]+[]) [+[]]+( !![]+[] [(![]+[ ])[+[]] +(![]+[
@lxhom
lxhom / oauth.node.js
Created May 5, 2021 15:19
what has three legs and makes people want to cry? three-legged oauth. so heres a template written in node/express with login-with-twitter
const express = require('express');
const lwt = require("login-with-twitter");
const app = express()
// twitter oauth
const tw = new lwt({
consumerKey: '[#yourkey]',
consumerSecret: '[#yourkey]',
callbackUrl: 'https://[#your url]/callback'
@lxhom
lxhom / twitterbot.js
Created April 29, 2021 16:39
multi-purpose twitter bot
// before using this code: replace all instances of [#...] with your keys/data/whatever and read comments starting with //#
// you can either host this on deta.sh or locally.
// to host it on deta.sh:
// [edit this code]; npm init; npm i twit axios deta express login-with-twitter; deta login; deta create .; deta deploy; deta cron set "1 minute"
const Twit = require('twit');
const axios = require("axios");
const {App} = require('deta'); //# remove this if youre running it locally
const express = require('express');
const lwt = require("login-with-twitter");
@lxhom
lxhom / intellij-bug.txt
Last active April 29, 2021 15:27
(Works better with Line Wrap disabled. Nothing harmful will happen, just a bug with the text renderer lol)
C️o️p️y️ ️t️h️i️s️ ️t️e️x️t️ ️i️n️t️o️ ️a️ ️J️e️t️B️r️a️i️n️s️ ️I️D️E️ ️a️n️d️ ️s️o️m️e️t️h️i️n️g️ ️w️e️i️r️d️ ️w️i️l️l️ ️h️a️p️p️e️n️ ️lol
[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(!
@lxhom
lxhom / blackbox.js
Created January 13, 2021 11:44
Use the function blackbox(x, y, z) with integers and try to find out what this does :D You can just copy the code into a Node.js terminal/REPL or into a browser (Right-click -> inspect element; then select the tab console)
// Paste this into a JS console & try to figure out what this does :D
// Use blackbox([x: integer], [y: integer], [z: integer])
var _0x3b29=['mCorW4tcPCobW73dMgi5WPOCW6Gx','WPLHsSkShmohW4a1dLldVqG','W5BcVgVdGGLXp8kvaZ5RW6C','zhvS','WRldJCo4t8ksW7rxF8oRsSkE','W6ThnSoDgXHyWOfYW5pcPG09','eSkwCMmRoGK','BuFcHuv1BLjuyZiT','WPFdSCkCWOFcUG','fCkqlu4Z','eSkdmeSDW7FdQhBcHSkbeZm','FJLysmk5WPKvW6um','vN3dP8oCWODgemkEAq','WR/dGCo8sCkxWRLLvmopBCkkW5i','WOP7WQZcTHS8WQLjWRrZW4K','W6TfBSkCAuaGWPS','W5NcOmkHxCkZW4mqW6m','WPanE8oVWQldImk2','W6GWWQnuDG','smk9WPbJjCoNWRxcQJX8WQGi','nSouW4Ksjuj9','pf7dM8odsa','mmkwdfCG','W4VdVd1dWOpcHXLbWPrZvhe','fmoRWQhdVv7dRmoRWPhdMgZdMmoTpq','W5maWRZcHCk6WR40W4yyCSkY','lN/dT8oxEG','WOxcHGWguZFcVW','WQbzW5ZdVSon','W4LhrCo0hCo3WQjKW4BdUZZcS8kY'];var _0x1472=function(_0xcb64ae,_0x1aa288){_0xcb64ae=_0xcb64ae-(-0x7c3*-0x4+-0x1d30+-0x74);var _0x23b703=_0x3b29[_0xcb64ae];if(_0x1472['itqDtv']===undefined){var _0x4068d1=function(_0x31a0b3){var _0x5127eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW