Skip to content

Instantly share code, notes, and snippets.

View carlohcs's full-sized avatar
🎯
Focusing on my Postgraduate degree!

Carlos Santana carlohcs

🎯
Focusing on my Postgraduate degree!
View GitHub Profile
@carlohcs
carlohcs / domain.css
Created March 4, 2020 19:12
domain css
@import url(http://jsuol.com.br/g/uolfw/fonts/uol-text.css?type=bold,light&cache=11);
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
@carlohcs
carlohcs / domainlogin.js
Created March 4, 2020 18:55
DomainLogin.js
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){var r;/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */!function(t,n){"object"
@carlohcs
carlohcs / git-diff-helpers.txt
Created September 30, 2019 20:46
Git diff Helpers
git diff --stat
git diff --numstat
git diff --shortstat
git diff --dirstat
git diff --name-status
@carlohcs
carlohcs / Force-SSL-Heroku.js
Created September 17, 2019 00:50
Força o redirect para HTTPS no Heroku
function forceSSL(req, res, next) {
if (req.headers['x-forwarded-proto'] !== 'https') {
// console.log('FORCING SSL. Redirecting... ', [BASE_URL, req.url].join(''))
return res.redirect(301, [BASE_URL, req.url].join(''))
}
@carlohcs
carlohcs / setup-php-apache-mac.txt
Created July 24, 2019 02:31
Configurar PHP com Apache no Mac
https://getgrav.org/blog/macos-mojave-apache-multiple-php-versions
@carlohcs
carlohcs / docker-cheat-sheet.md
Created April 20, 2019 01:13
Docker cheat sheet

Docker Cheat Sheets

Alguns cheat sheets do Docker.

Pega logs de uma instancia que está com detach

$ docker logs --tail 50 --follow --timestamps c3b8b3f5a77e
@carlohcs
carlohcs / onTransitionEnd.js
Created March 17, 2019 00:21
Check when the transition is finished
/* From Modernizr */
function whichTransitionEvent() {
var t;
var el = document.createElement('fakeelement');
var transitions = {
'transition': 'transitionend',
'OTransition': 'oTransitionEnd',
'MozTransition': 'transitionend',
'WebkitTransition': 'webkitTransitionEnd'
}
@carlohcs
carlohcs / onAnimationEnd.js
Created March 17, 2019 00:19
Check when the animation is finished
// https://davidwalsh.name/css-animation-callback
/* From Modernizr */
function whichAnimationEvent() {
var t;
var el = document.createElement('fakeelement');
var animations = {
'animation': 'animationend',
'WebkitAnimation': 'webkitTransitionEnd'
}
@carlohcs
carlohcs / run-jest-file-vs-code.json
Last active October 2, 2018 22:27
Run jest file in vscode
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"windows": {
@carlohcs
carlohcs / ava-vscode.json
Created May 25, 2018 19:20
Runing ava in VSCODE
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run Ava Tests",