Skip to content

Instantly share code, notes, and snippets.

View Adrian1690's full-sized avatar

Adrian Peña Adrian1690

  • Lima , Perú
View GitHub Profile
@Adrian1690
Adrian1690 / vimcommands
Created September 20, 2020 22:01
Commands used to navigate in Vim
commands:
hjkl: move to directions
w: next word
b: before work
e: to the final or next word
i: insert before cursor
a: insert after cursor
shift + a: insert to the final linea
x: Delete characters (in normal mode)
u: undo
@Adrian1690
Adrian1690 / nginx.conf
Last active April 5, 2020 20:56
Example nginx example proxy_pass that redirect /api request to serverservice(kubernetes service ClusterIp)
upstream serverservice {
server serverservice;
}
server {
listen 80;
location /api {
proxy_set_header X-Real-IP $remote_addr;
@Adrian1690
Adrian1690 / demoservers.yml
Created January 22, 2020 00:27
Server configuration
Description: >
Adrian Peña / Udacity
Parameters:
EnvironmentName:
Description: An environment name that will be prefixed to resource names
Type: String
Resources:
@Adrian1690
Adrian1690 / testcfn.yml
Last active January 21, 2020 01:55
CloudFormation
#./create.sh ourinfrastack ourinfra.yml ourinfra-parameters.json
Description: >
Adrian Peña / Udacity Course
Template to deploy a VPC
Resources:
UdacityVPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
@Adrian1690
Adrian1690 / gist:8417899010dc98e34bb5fb37edc2573b
Last active March 19, 2019 21:38
Comands intermediate git
// force push
git push --force
//Identify merged branches
git branch --merged
git branch --no-merged
//Delete local Branches
git branch -d branchname
//delete remote branch
@Adrian1690
Adrian1690 / frontend.conf
Last active July 24, 2020 18:36
conf sites and virtual host apache2
cat /etc/apache2/sites-available/van-frontend.conf
#alias /van-frontend /var/www/html/van-frontend/
#<Directory "/home/ubuntu/jenkins-local/workspace/prevanfrontend/build">
# AllowOverride All
# Order allow,deny
# allow from all
# Require all granted
#</Directory>
<VirtualHost *:80>
#DocumentRoot /var/www/html
@Adrian1690
Adrian1690 / launch.json
Created January 25, 2019 22:22
frontend debug 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": "Launch Program",
@Adrian1690
Adrian1690 / launch.json
Created January 25, 2019 22:21
backend debug vscode config
{
// 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": [
{
"name": "Van backend",
"type": "php",
"request": "launch",
@Adrian1690
Adrian1690 / gist:c783504099414b04f7133790218cf2cb
Created September 22, 2017 03:51
Connect ssh without password
==============================================================
Step 1: Create public and private keys using ssh-key-gen on local-host
==============================================================
jsmith@local-host$ [Note: You are on local-host here]
jsmith@local-host$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]