Skip to content

Instantly share code, notes, and snippets.

View FANMixco's full-sized avatar
💡
Technovating!

Federico Navarrete FANMixco

💡
Technovating!
View GitHub Profile
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
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;
spring.datasource.url=jdbc:postgresql://localhost/myDatabase
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.hibernate.hbm2ddl.auto=update
spring.jpa.hibernate.ejb.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy
spring.jpa.hibernate.show_sql=true
spring.jpa.hibernate.format_sql=true
spring.jpa.hibernate.use_sql_comments=false
@gokulkrishh
gokulkrishh / media-query.css
Last active July 26, 2024 23:20
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@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;
@FANMixco
FANMixco / forms.html
Last active December 16, 2021 22:42
Input and Select Material Design Style for Bootstrap 5
<!--Copyrights:
https://codingyaar.com/bootstrap-5-material-design-form-responsive/
-->
<!DOCTYPE html>
<html>
<head>
<title>Forms</title>
<body>
<style>
.form-select, .form-control {
@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 / 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 / Basic multilingual support for static pages
Last active August 25, 2022 09:57
A simple solution for translating static websites with JS and a data attribute (data-translation)
These scripts allow people to build static pages with multilingual support without any framework or special libs.
@FANMixco
FANMixco / gist:5d6b9d746cc801eb93da6ac898b020c3
Created March 4, 2024 17:29
OpenAI JSON sample for gpt-3.5-turbo-instruct
{
"choices": [
{
"text": "Generated text goes here."
}
],
"completion": {
"model": "gpt-3.5-turbo-instruct",
"prompt": "Your input prompt goes here.",
"temperature": 0.7,
{
"created": "11212121",
"data": [
{
"url": "https://...."
}]
}