Skip to content

Instantly share code, notes, and snippets.

Avatar

Albirew

View GitHub Profile
@Albirew
Albirew / arch.js
Created Jan 12, 2016
Un vieux JS pour executer une action selon l'architecture de l'utilisateur (un exemple d'usage sur: http://albirew.fr/nddyn/ )
View arch.js
/*JavaScript action based on Arch*/
if (navigator.userAgent.indexOf('MSIE') != -1 ){document.write('<span style="color:red; font-weight: bold;">Internet ExplHORREUR!</span>');}
else if (navigator.userAgent.indexOf('Trident') != -1 ){document.write('<span style="color:red; font-weight: bold;">Internet ExplHORREUR!</span>');}
else if (navigator.userAgent.indexOf('Win64') != -1 ){document.write('<span style="color:green; font-weight: bold;">x64 browser on x64 Windows</span>');}
else if (navigator.userAgent.indexOf('WOW64') != -1 ){document.write('<span style="color:red; font-weight: bold;">x86 browser on x64 Windows</span>');}
else if (navigator.userAgent.indexOf('i686 on x86_64') != -1 ){document.write('<span style="color:red; font-weight: bold;">x86 browser on x64 Linux</span>');}
else if (navigator.userAgent.indexOf('x86_64') != -1 ){document.write('<span style="color:green; font-weight: bold;">x64 browser on x64 Linux</span>');}
else {document.write('... . . . something!');}</script>
@Albirew
Albirew / ratio.js
Created Jan 12, 2016
Un vieux JS pour rediriger l'utilisateur selon sa résolution (surtout pour différencier les smartphones)
View ratio.js
/*JavaScript Redirection based on Ratio*/
var s = (screen.height/screen.width)
if (s==.75)
window.location.replace("/lol?somevars=4-3") // 4:3
else if (s==.625)
window.location.replace("/lol?somevars=8-5") // 8:5 (16:10)
else if (s==.5625)
window.location.replace("/lol?somevars=16-9") // 16:9
else if (s==.5294117647058824)
window.location.replace("/lol?somevars=17-9") // 17:9
@Albirew
Albirew / remove_GWX.bat
Last active Mar 14, 2017
Remove shitty Windows 10 upgrade notification from your W7-W8.1 computer
View remove_GWX.bat
@echo off
:: Writed by CynerOne, updated and commented by Albirew
:: CynerOne original located here: http://lecrabeinfo.net/desinstaller-lapplication-obtenir-windows-10-supprimer-icone-windows-10.html#comment-2374542969
:: also added rev.18 of Matt's privilege escalation script: http://stackoverflow.com/posts/12264592/revisions
:: V2 added Inny suggestion: http://www.nextinpact.com/news/97735-microsoft-se-fait-plus-insistant-sur-migration-vers-windows-10.htm#/comment/5555097
:: V3 added Timo's list: http://lehollandaisvolant.net/?d=2016/01/16/13/29/06-windows-78-bloquer-les-mises-a-niveau-vers-windows-10
:: V4 escaped chevrons inside echo (my bad)
:: V5 reordered updates removal by kb number for readability and added some of isleaked updates: https://fix10.isleaked.com/oldwindows.html
:: V6 modified error check to make it not stop when non fatal error occur and added script to automatically hide nasty updates on Windows Update ( https://gist.github.com/neckcen/f099eda0b1cde283cdc9 )
:: V7 added WGA update and