Skip to content

Instantly share code, notes, and snippets.

View MakingPoutine's full-sized avatar
🏠
Working from home

MakingPoutine MakingPoutine

🏠
Working from home
  • Canada
View GitHub Profile
@SitanHuang
SitanHuang / typeracer.hack.js
Last active April 1, 2024 05:26
Typeracer 100% hack (Version 2 - Aadaptive Mode - Types at minimum speed required to win)
function triggerKeyboardEvent(el, keyCode, type)
{
var eventObj = document.createEventObject ?
document.createEventObject() : document.createEvent("Events");
if(eventObj.initEvent){
eventObj.initEvent(type, true, true);
}
eventObj.keyCode = keyCode;
According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?
@TwiN
TwiN / [PYTHON]file_get_contents(URL).py
Last active August 22, 2022 22:44
Python equivalent of PHP's file_get_contents on websites (NOT LOCAL FILES)
import urllib2,cookielib
'''
Function that returns the source from the target url
@param url
'''
def file_get_contents(url):
url = str(url).replace(" ", "+") # just in case, no space in url
hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>