Skip to content

Instantly share code, notes, and snippets.

View fabioluzm's full-sized avatar

Fabio Moreira fabioluzm

  • PrimeIT
  • Portimão, Portugal
  • 02:41 (UTC +01:00)
View GitHub Profile
@fabioluzm
fabioluzm / css-reset.css
Last active March 3, 2024 11:27
CSS Basic Reset
/* SOME PLAIN CSS RESETS */
/*
1. Fix mobile increase font-size on landscape mode
*/
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: 100%;
text-size-adjust: none;
}
@fabioluzm
fabioluzm / caching-https-creds.markdown
Created April 22, 2020 15:23 — forked from ahoward/caching-https-creds.markdown
Fix Username/Password prompting for github repos cloned via https scheme

github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers

in your home directory create a file called '.netrc', for example

/Users/ahoward/.netrc

in it put these contents

@fabioluzm
fabioluzm / animacao-interativa-css-transitions.markdown
Created October 21, 2019 22:03
Animação Interativa - CSS Transitions
@fabioluzm
fabioluzm / css-transitions.markdown
Created October 21, 2019 22:02
CSS Transitions
@fabioluzm
fabioluzm / checkform.js
Last active September 26, 2019 16:03
validade form with native JS
function validadeForm() {
var lang = document.documentElement.lang;
switch (lang)
{
case 'pt':
var language = 'pt',
error_message = 'Campo obrigatório.'
break;
@fabioluzm
fabioluzm / imgLoader.js
Created September 16, 2019 14:29
Delayed loader for images
// you need on the HTML to set the img url into the data-src, and the pre-load img(gif) on the src
// function below gets your data-src info and set it on the src attribute after 1500ms
window.setTimeout(function() {
var images = document.getElementsByTagName('img');
for (var i = 0; i < images.length; i++) {
var currImage = images[i];
if (currImage.getAttribute('data-src')) {
@fabioluzm
fabioluzm / HEXtoRGB.cfc
Created August 1, 2019 14:32
Convert HEX to RGB
<cffunction name="HexToRGB" returnType="string" hint="Convert HEX code to RGB(A) using 3 or 6 HEX digit value (valid examples: ##FFF, FFF, ##FFFFFF, FFFFFF)" access="remote">
<!--- Variable that will receive the converted RGB value --->
<cfset var rgbColor = "">
<!--- Start out with a base HEX web color of 3 or 6 digit value. --->
<cfset var HexColor = ARGUMENTS.HexColor>
<!--- look for a leading '#' and set an offset to use as a caller to removeChars --->
<cfset var offset = 0>
@fabioluzm
fabioluzm / _mixins.sass
Created August 1, 2019 14:23
SASS Mixins
// In this file you will find the mixins to use in this project.
// If you change this file you will need to recompile
// the main style structure file again!
// to do that just run in a terminal box the following:
// sass {path/to/file.sass}:{path/to/file.css}
// RESET VALUES MIXIN
=reset
html,
@fabioluzm
fabioluzm / README.md
Created August 1, 2019 14:22
README.md Template

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites