This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Adam | |
10-3-18 | |
Basic Math | |
Does some maths! */ | |
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
unsigned long factoral(const unsigned long i) { | |
if(i == 1) | |
return 1; | |
return i * factoral(i - 1); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const PATTERN = '~" translate="no">(.+)<\/a><\/div>~'; | |
$time = time(); | |
$today = strtotime(date('Y-m-d', $time)); | |
$dateTime = (new DateTime())->setTimestamp($time - $today); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("Test script loaded"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go to the page that redirects | |
// Execute in console | |
fetch('https://iwanttoremovethis.com', {method: 'post'}).then(() => {}) | |
// Enjoy ~ |
OlderNewer