Skip to content

Instantly share code, notes, and snippets.

Avatar
🐉
The gaze into the Sun.

Esteban Rocha Esteban-Rocha

🐉
The gaze into the Sun.
View GitHub Profile
@Esteban-Rocha
Esteban-Rocha / index.js
Created Nov 10, 2020
Unlock paste on websites
View index.js
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
// Run the code in the devtools console.
@Esteban-Rocha
Esteban-Rocha / .circleci config.yml
Created Sep 3, 2020 — forked from ryanshoover/.circleci config.yml
CircleCI 2.1 Continuous Integration with WP Engine
View .circleci config.yml
# Continuous Integration to a WP Engine install
# PHP CircleCI 2.1 configuration file
# Requirements:
# 1. In CircleCI settings, add environment variables for your site's installs:
# * WPE_PRODUCTION_INSTALL=thenameofyourproductioninstall
# * WPE_STAGING_INSTALL=thenameofyourstaginginstall
# * WPE_DEVELOPMENT_INSTALL=thenameofyourdevelopmentinstall
# 2. In your repo, have two files
# * `./.gitignores/__default` -- Excludes any compiled files
View keybase.md

Keybase proof

I hereby claim:

  • I am esteban-rocha on github.
  • I am estebanrocha (https://keybase.io/estebanrocha) on keybase.
  • I have a public key ASC0fbmkzzsKbeWDPQpIKlwz6suUXa3vW4sW8LsZA1suPQo

To claim this, I am signing this object:

View For WPengine (.gitlab-ci.yml)
before_script:
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$PRIVATEKEY" | tr -d '\r' | ssh-add - > /dev/null
stages:
- deploy_staging
- deploy_master
@Esteban-Rocha
Esteban-Rocha / js-terms.md
Created Oct 30, 2018 — forked from ahmadawais/js-terms.md
10 terms to help you better understand JavaScript
View js-terms.md

10 JavaScript Terms You Should Know

From currying to closures there are quite a number of special words used in JavaScript. These will not only help you increase your vocabulary but also better understand JavaScript. Special terms are normally found in documentation and technical articles. But some of them like closures are pretty standard things to know about. Knowing what the word itself means can help you know the concept it's named for better.

  1. Arity
  2. Anonymous
  3. Closure
  4. Currying
  5. Hoisting
  6. Mutation
@Esteban-Rocha
Esteban-Rocha / .htaccess
Created Sep 25, 2018
Basic caching with .htaccess
View .htaccess
## EXPIRES CACHING ##
# <IfModule mod_expires.c>
# ExpiresActive On
# ExpiresByType image/jpg "access 1 year"
# ExpiresByType image/jpeg "access 1 year"
# ExpiresByType image/gif "access 1 year"
# ExpiresByType image/png "access 1 year"
# ExpiresByType text/css "access 1 month"
# ExpiresByType text/html "access 1 month"
# ExpiresByType application/pdf "access 1 month"
View IE CSS Hacks All - IE6, 7, 8, 9, 10, 11, Edge
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@Esteban-Rocha
Esteban-Rocha / index.html
Created Jul 22, 2018 — forked from exallium/index.html
Tab Layout in HTML/CSS/Javascript
View index.html
<head>
<link rel="stylesheet" type="css" href="css/tab.css" />
<script src="js/tab.js" type="text/javascript"></script>
</head>
<body>
<div class="tab-wrapper">
<div class="tab-button-wrapper">
<ul>
<li><a class="tab-button-first"
id="tab-button1"
@Esteban-Rocha
Esteban-Rocha / multiple_ssh_setting.md
Created Jun 20, 2018 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Esteban-Rocha
Esteban-Rocha / drupal8-settings-devel-kint-maxLevels-override.md Drupal 8 kint set maxLevels in settings.php to prevent out of memory
View drupal8-settings-devel-kint-maxLevels-override.md

Currently devel doesn't allow to override KINT configuration in a clean way. Hopefully this will be possible some day via setting in UI or drupal setting override in settings.php Until this happens you may use this dirty trick in settings.php to override the setting.

See issues:

Simply copy this into your settings.php and change the value accordingly (Kint default: 7)

You can’t perform that action at this time.