Skip to content

Instantly share code, notes, and snippets.

View sidkr's full-sized avatar
🎯
Focusing

{{displayName}} sidkr

🎯
Focusing
View GitHub Profile
@Cezarion
Cezarion / affix.html
Created October 8, 2013 10:36
Affix js with vanilla js
<script type="text/javascript">
window.onscroll = scroll;
function scroll () {
var scrollTop = window.pageYOffset;
console.log(scrollTop);
if( scrollTop > 363 ){
document.getElementById('summary').style.top="20px";
document.getElementById('summary').style.position="fixed";
}
else
@leonardofed
leonardofed / README.md
Last active March 14, 2025 18:19
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@deanhume
deanhume / clear-cache.js
Created September 20, 2017 08:22
Clear Service Worker Cache
if ('serviceWorker' in navigator) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
}
@deanhume
deanhume / ambient-light.js
Created June 27, 2018 15:12
Ambient Light Sensor
const details = document.getElementById("details");
// Feature detection
if (window.AmbientLightSensor){
try{
const sensor = new AmbientLightSensor();
// Detect changes in the light
sensor.onreading = () => {
details.innerHTML = sensor.illuminance;