Skip to content

Instantly share code, notes, and snippets.

🐙
PLING

felipekm felipekm

🐙
PLING
Block or report user

Report or block felipekm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felipekm
felipekm / install.sh
Created Apr 26, 2019
Package cairo was not found in the pkg-config search path. Node j.s install canvas issue
View install.sh
yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel
View gist:c1462cd9197c46ebe123f22188bb14d5
sudo ln -s "$(which node)" /usr/bin/node -f
@felipekm
felipekm / validates_ssl.md
Last active Feb 27, 2019
Validates that certificate matches / signs the private key
View validates_ssl.md
$ openssl rsa -noout -modulus -in private-key.key  2> /dev/null | openssl md5
(stdin)= 3a5a1682678d243b6b8337360b55ff10

$ openssl x509 -noout -modulus -in intermediate.crt 2> /dev/null | openssl md5
(stdin)= 3a5a1682678d243b6b8337360b55ff10
@felipekm
felipekm / launch.json
Created Feb 17, 2019
VS Code nextjs debug
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Next: Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"sourceMapPathOverrides": {
@felipekm
felipekm / self_signed_pem.sh
Created Feb 13, 2019
Creates a self-signed PEM file
View self_signed_pem.sh
#/bin/sh
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
View cron_job_tab_schedule.md

To open crontab schedule

sudo vim crontab -e

Executes a script passing arguments

1 2 3 4 5 /path/to/command arg1 arg2

Executes a shell script

1 2 3 4 5 /root/backup.sh

@felipekm
felipekm / do_ssh.md
Created Nov 19, 2018
Digital Ocean ssh access permission
View do_ssh.md
  • Log as as a root to you Ubuntu server
  • vi /etc/ssh/sshd_config

Now go to very bottom: PasswordAuthentication from "no" to "yes".

Type: service sshd reload

View golangbrew.md

Includes in .zshrc or .bashrc file

export GOPATH="${HOME}/.go" export GOROOT="$(brew --prefix golang)/libexec" export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" test -d "${GOPATH}" || mkdir "${GOPATH}" test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"

  • source ~/.zshrc or source ~/.bashrc
  • brew install go
@felipekm
felipekm / kill_node.sh
Last active Sep 19, 2018
Remove NVM, NODE, NPM completely
View kill_node.sh
# RM ALL WHICH OUTS with rm
which npm
which node
whoch nvm
# Clean usr
sudo rm -rf /usr/bin/node
sudo rm -rf /usr/bin/npm
# Clean path
@felipekm
felipekm / grok-patterns
Created Aug 24, 2018
Logstash Grok Patterns
View grok-patterns
USERNAME [a-zA-Z0-9._-]+
USER %{USERNAME}
INT (?:[+-]?(?:[0-9]+))
BASE10NUM (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))
NUMBER (?:%{BASE10NUM})
BASE16NUM (?<![0-9A-Fa-f])(?:[+-]?(?:0x)?(?:[0-9A-Fa-f]+))
BASE16FLOAT \b(?<![0-9A-Fa-f.])(?:[+-]?(?:0x)?(?:(?:[0-9A-Fa-f]+(?:\.[0-9A-Fa-f]*)?)|(?:\.[0-9A-Fa-f]+)))\b
POSINT \b(?:[1-9][0-9]*)\b
NONNEGINT \b(?:[0-9]+)\b
You can’t perform that action at this time.