Skip to content

Instantly share code, notes, and snippets.

View devjoca's full-sized avatar
🤠
One more day in peruvialand

Joca devjoca

🤠
One more day in peruvialand
View GitHub Profile
const simulation = d3
.forceSimulation()
.force(
"link",
d3
.forceLink()
.id(function (d) {
return d.name;
})
.strength(0.015)
@devjoca
devjoca / server_certificates_to_pem.md
Created May 5, 2020 04:41 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

@devjoca
devjoca / server_certificates_to_pem.md
Created May 5, 2020 04:41 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12

Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample

App Engine Deployer
App Engine Service Admin
Cloud Build Service Account
Storage Object Creator
Storage Object Viewer
@devjoca
devjoca / gitlab_dag_diagram.py
Created February 17, 2020 19:18 — forked from aarongorka/gitlab_dag_diagram.py
Prints a PlantUML diagram that shows the DAG of the GitLab pipeline
#!/usr/bin/env python3
"""Prints a PlantUML diagram that shows the DAG of the GitLab pipeline"""
import sys
import yaml
from pprint import pprint
def merge(user, default):
if isinstance(user,dict) and isinstance(default,dict):
for k,v in default.items():
@devjoca
devjoca / gitlab_dag_diagram.py
Created February 17, 2020 19:18 — forked from aarongorka/gitlab_dag_diagram.py
Prints a PlantUML diagram that shows the DAG of the GitLab pipeline
#!/usr/bin/env python3
"""Prints a PlantUML diagram that shows the DAG of the GitLab pipeline"""
import sys
import yaml
from pprint import pprint
def merge(user, default):
if isinstance(user,dict) and isinstance(default,dict):
for k,v in default.items():

Database setup

create database db_name charset utf8mb4;
create user db_user@localhost identified by 'db_password';
grant all privileges on db_name.* to db_user@localhost;
flush privileges;

For RDS

@devjoca
devjoca / Software architect.md
Last active September 19, 2019 20:27
Software architect

# Software Architect (Tech Leadership)

Role

  • Architect and provide technical leadership for major new initiatives.
  • Roadmaps and solution architectures for new and existing business solutions, make the provided architecture design capable of evolving in time.
  • Reinforce team skills, provide leadership and mentor to them.
  • Work closely with other developers, analysts and project managers as well as business partners / product managers and other technology teams.
  • Deliver innovative, cost effective technology solutions which align to enterprise architecture standards and achieve business requirements.
  • Provide technical leadership and support to our business partners specific to emerging technologies and standards.
@devjoca
devjoca / Start pm2 process
Created March 4, 2019 19:14 — forked from gianlucacandiotti/Start pm2 process
Starts pm2 process using specified npm script
pm2 start npm --name "NAME" -- run script-name

Deployments

The following steps is what we tipically use in a standard Laravel application, so feel free to use extra steps if your application needs a specific feature. The default stack we assume you use is php-fpm and nginx.

First we need to install some default depedencies

sudo apt-get install -y unzip build-essential software-properties-common git nginx