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
window.scrollTo(0, 0) | |
var bodyRect = document.body.getBoundingClientRect(); | |
var items = Array.prototype.slice.call( | |
document.querySelectorAll('*') | |
).map(function(element) { | |
var rect=element.getBoundingClientRect(); | |
return { | |
element: element, | |
include: (element.tagName === "BUTTON" || element.tagName === "A" || (element.onclick != null) || window.getComputedStyle(element).cursor == "pointer"), |
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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
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
/* | |
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc> | |
NOTE - 2021-05-24 | |
----------------- | |
The script below isn't the fastest way to copy-and-paste from a protected | |
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from | |
the comments: |
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
function downloadCanvasAsImage(canvas, filename){ | |
let a = document.createElement("a") | |
a.href = canvas.toDataURL() | |
a.download = filename | |
a.dispatchEvent(new MouseEvent("click")) | |
} |
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
; SpotifyGlobalKeys.ahk: | |
; AutoHotkey script to control Spotify with global keyboard shortcuts | |
; Author: James Teh <[email protected]> | |
; Copyright 2017-2018 James Teh | |
; License: GNU General Public License version 2.0 | |
DetectHiddenWindows, On | |
; Get the HWND of the Spotify main window. | |
getSpotifyHwnd() { |
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 | |
define('CACHE_DIR', './cache'); | |
define('FONT', './lido_stf_ce.ttf'); // you need to get this one yourself | |
define('OUR_URL', 'https://vazkii.us/favorite-ur'); | |
if(!file_exists(CACHE_DIR)) | |
mkdir(CACHE_DIR); | |
$idol_names = | |
[ 'Kousaka Honoka', 'Ayase Eli', 'Minami Kotori', 'Sonoda Umi', 'Hoshizora Rin', 'Nishikino Maki', 'Toujou Nozomi', 'Koizumi Hanayo', 'Yazawa Nico', |
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
#Spider Websites with Wget – 20 Practical Examples | |
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
1. Download a single file from the Internet | |
wget http://example.com/file.iso | |
2. Download a file but save it locally under a different name | |
wget ‐‐output-document=filename.html example.com |
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
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a> |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<input id="file" type="file" accept="image/*" /> | |
<br/> | |
<h2>As read:</h2> | |
<img id="placeholder1" width=300/><br/> | |
<h2>Rotated by exif data:</h2> | |
<img id="placeholder2" width=300/> | |
<script> |