Skip to content

Instantly share code, notes, and snippets.

View artulloss's full-sized avatar

Adam Tulloss artulloss

View GitHub Profile
@artulloss
artulloss / maths.cpp
Last active October 10, 2018 01:32
My first C++ project!
/* Adam
10-3-18
Basic Math
Does some maths! */
#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
@artulloss
artulloss / Factoral
Last active December 18, 2018 15:11
A c++ factorial script I wrote in like 5 minutes
#include <iostream>
#include <string>
unsigned long factoral(const unsigned long i) {
if(i == 1)
return 1;
return i * factoral(i - 1);
@artulloss
artulloss / update.sh
Created April 17, 2020 00:18
Easily update pocketmine! You can also choose the version to check out by doing ./update.sh <version>
rm PocketMine-MP.phar.old 2> /dev/null
mv ./PocketMine-MP.phar ./PocketMine-MP.phar.old
echo "Backup of old Pocketmine-MP.phar stored at Pocketmine-MP.phar.old"
if [ $# -eq 0 ] # Empty arguments
then
curl -s https://api.github.com/repos/pmmp/Pocketmine-MP/releases/latest \
| grep "browser_download_url.*phar" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
<?php
const PATTERN = '~" translate="no">(.+)<\/a><\/div>~';
$time = time();
$today = strtotime(date('Y-m-d', $time));
$dateTime = (new DateTime())->setTimestamp($time - $today);
@artulloss
artulloss / antiClarifyBox.js
Last active December 3, 2020 23:32
This will block the clarify box that google uses to push messages to users with on Youtube.
// ==UserScript==
// @name Remove clarify box
// @namespace https://artulloss.dev
// @version 0.1
// @description Block youtubes "clarify box"
// @author artulloss
// @match https://*.youtube.com/*
// @grant none
// @updateURL
// @license MIT
@artulloss
artulloss / html.js
Last active July 10, 2021 02:13
Simple HTML in JS
// Rather than writing document.createElement() to create HTML attributes, this function will do it for you
const html = (string, ...props) => {
if(props.length) {
let interpolatedString = "";
for(let i = 0; i < string.length; i++) {
if(props[i] !== undefined) {
interpolatedString += string[i] + props[i];
} else {
interpolatedString += string[i];
@artulloss
artulloss / alert.js
Created December 9, 2021 14:58
Alert script, for testing script loading and XSS
alert("Test script loaded");
@artulloss
artulloss / index.js
Last active January 13, 2022 02:18
Spam Jokes in discord server chat for grinding unbelievaboat money. This shouldn't be detectable / it's not a self bot. Requires selenium.
const {Builder, By, Key, until, Origin} = require('selenium-webdriver');
const JokeAPI = require('sv443-joke-api');
const url = "https://discord.com/channels/708291410612322345/708293571236593725"; // Page to load
const channelTitle = "💬・chat" // Do document.title on the page in browser
const random = (length = 8) => {
return Math.random().toString(16).substr(2, length);
};
@artulloss
artulloss / email-regex.js
Last active February 23, 2022 21:46
Email Regex Javascript
// This is the same checks as the HTML5 email input form field as outlined in the link below.
// Email regex
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
function isEmail(email) {
// https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
const regex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
return regex.test(email)
}
@artulloss
artulloss / remove.js
Created June 30, 2022 15:36
Remove domain redirect from cache
// Go to the page that redirects
// Execute in console
fetch('https://iwanttoremovethis.com', {method: 'post'}).then(() => {})
// Enjoy ~