Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Heilmann codepo8

View GitHub Profile
View devtools-detection.js
var tryCount = 0;
var minimalUserResponseInMiliseconds = 200;
function check() {
console.clear();
before = new Date().getTime();
debugger;
after = new Date().getTime();
if (after - before > minimalUserResponseInMiliseconds) {
document.write(" Dont open Developer Tools. ");
self.location.replace(window.location.protocol + window.location.href.substring(window.location.protocol.length));
@codepo8
codepo8 / adblocker-detect.js
Created Nov 14, 2022
Adblocker detection found in the wild
View adblocker-detect.js
function hab() {
var t = document.createElement('div');
t.innerHTML = ' ';
t.className = 'ad doubleclick google-ad adsbox pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads skyscraper text-ad-links';
var e = !(t.style = 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;');
try {
document.body.appendChild(t);
var a = document.getElementsByClassName('adsbox')[0];
if (0 !== a.offsetHeight && 0 !== a.clientHeight || (e = !0), void 0 !== window.getComputedStyle) { var d = window.getComputedStyle(a, null); !d || 'none' != d.getPropertyValue('display') && 'hidden' != d.getPropertyValue('visibility') || (e = !0) } document.body.removeChild(t)
}
@codepo8
codepo8 / reset.md
Created Oct 8, 2022
Reset WLAN in train
View reset.md

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z

openssl rand -hex 6 | sed 's/(..)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether

View OCV snippet.js
document.body.addEventListener('click', e=>{
let t = e.target;
if(t.classList.contains('row')){
let p = t.parentElement.parentElement.parentElement;
let s = t.parentElement.parentElement;
s.style.background = 'yellow';
let elm = [...t.querySelectorAll('.display-text')];
elm = elm.filter(x=>x.innerText=='Edge\\Developer Tools');
if(elm[0]){
elm[0].parentElement.nextElementSibling.nextElementSibling.click();
@codepo8
codepo8 / transmission-resouces.md
Last active Jul 12, 2022
Resources of the Transmission64 "Cheating like a pro" presentation
View transmission-resouces.md
View flight facts.md

Fact #01 - Sky Babies

Apart from a crash, the worst nightmare of every flight attendant is childbirth on board. Although extremely rare, nearly 60 babies were born in the sky!

https://www.cntraveller.in/story/explained-happens-baby-born-airplane/

Fact #02 - A long flight

The longest commercial flight you can book is a flight from Singapore to New York that lasts 18 hours 50 minutes... better get comfortable!

@codepo8
codepo8 / codeeurope2022.md
Last active Jun 2, 2022
Resources for the talk "Increasing developer effectivity by merging browser tooling and editors" at CodeEurope 2022
@codepo8
codepo8 / devrelsummit.md
Last active Dec 14, 2021
Live Notes on DevRelSummit Asia 2018
View devrelsummit.md

devrel-summit

DevRel Summit Asia 2018 Live Notes

These are my notes of the DevRel summit 2018 on 2nd of November in Singapore. They are by no means complete and I may have rushed a few bits. I'm looking forward to the videos and slide releases by the different presenters to fill in gaps and welcome comments on that. I hope this helps getting an idea what was covered.

Keynote Nicole Zhu, GoJek

devrel-in-10-years

View bettertogether.md

Resources for "The better together story of Edge DevTools"

We'd love you to help us to spread the message of this idea, so if you need anything (screencasts, videos, help to write blog posts), feel free to contact Chris Heilmann.

This talk/presentation

Materials to watch/read/send to people