Skip to content

Instantly share code, notes, and snippets.

View FANMixco's full-sized avatar
💡
Technovating!

Federico Navarrete FANMixco

💡
Technovating!
View GitHub Profile
@FANMixco
FANMixco / media-query.css
Created March 8, 2022 07:18 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@FANMixco
FANMixco / toggleAutoScalingGroup.md
Last active February 7, 2024 09:21 — forked from veuncent/toggleAutoScalingGroup.md
AWS Auto Scaling Groups: scheduled start/stop

Many times, we have a lot of cloud waste because we never shut down our services/EC2 instances. One of the trickiest cases to control is the Auto Scaling Groups.

Now, this tutorial that is based on Vicent's one, I'm going to help you automate this task using AWS EventBridge and Lambda functions.

It's important to highlight that you must create two Lambda functions:

  1. One for stopping that is going to have a 0 as the environment variables (MAX_SIZE and DESIRED_CAPACITY).
  2. One for starting that is going to have 1+ as the environment variables (MAX_SIZE and DESIRED_CAPACITY).

Now, the steps:

@FANMixco
FANMixco / animatedScrollTo.js
Created August 1, 2021 16:01 — forked from joshbeckman/animatedScrollTo.js
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;