service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-nameservice.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefixservice.beta.kubernetes.io/aws-load-balancer-additional-resource-tags(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled(true|false)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo rm -fr /opt/franz | |
| sudo rm -fr /usr/share/applications/franz.desktop | |
| # create installation dir | |
| sudo mkdir -p /opt/franz | |
| #install franz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| /* | |
| * Higher order component that passes `getInitialProps` through | |
| * to the child component | |
| */ | |
| const HOC = function(Child) { | |
| return class Higher extends React.Component { | |
| static getInitialProps(ctx) { | |
| return Child.getInitialProps(ctx) |
Node.js wrapper which will download and proxy to node locally. This allows you to automatically manage the installed version of node.
NODEW_INSTALL_VERSION - an env variable to specify the version of node to install - Defaults to 4.4.7 NODEW_DIST_BASE_URL - an env variable to specify the binary download location - Defaults to NodeJS website
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| root /home/javier/sites/sitename/public; | |
| index index.php index.html index.htm; | |
| server_name server_domain_or_IP; | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~ | |
| sudo apt-get update | |
| 1. Install PHP and Nginx | |
| #apt-get install software-properties-common | |
| sudo apt-get -y install nginx php7.0 php7.0-fpm php7.0-mbstring php7.0-xml git composer | |
| 2. Config Nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example: https://codepen.io/marcelo-ribeiro/pen/OJmVOyW | |
| const accentsMap = new Map([ | |
| ["A", "Á|À|Ã|Â|Ä"], | |
| ["a", "á|à|ã|â|ä"], | |
| ["E", "É|È|Ê|Ë"], | |
| ["e", "é|è|ê|ë"], | |
| ["I", "Í|Ì|Î|Ï"], | |
| ["i", "í|ì|î|ï"], | |
| ["O", "Ó|Ò|Ô|Õ|Ö"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pass the env-vars to MYCOMMAND | |
| eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
| # … or ... | |
| # Export the vars in .env into your shell: | |
| export $(egrep -v '^#' .env | xargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |