Skip to content

Instantly share code, notes, and snippets.

View petrenkorf's full-sized avatar
🤔
Reflecting about contributions

Petris Rodrigo Fernandes petrenkorf

🤔
Reflecting about contributions
  • E-Core
  • Balneário Camboriú, SC, Brazil
View GitHub Profile
@petrenkorf
petrenkorf / self-signed-certificate-with-custom-ca.md
Last active February 16, 2025 19:58 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

First we need OpenSSL installed, I'm using version OpenSSL 3.0.13

Create the Root Certificate

The first step is create a root CA (Certified Authority). -- DESCRIBE WHY--

The following command will create a key used to sign it:

openssl genrsa -des3 -out rootCA.key 4096
@petrenkorf
petrenkorf / animations.cljs
Created April 22, 2024 22:23 — forked from acobster/animations.cljs
Reagent animations with framer-motion
(ns app.motion
(:require
[framer-motion :refer (motion AnimatePresence useSpring useMotionValue useTransform useViewportScroll) :as motion]
[cljs-bean.core :refer [bean ->clj ->js]]))
(def div
(.-div motion))
(def span
(.-span motion))
(def li
(.-li motion))
<leader>eb - Evaluates the whole buffer
<leader>ls - Open log buffer horizontally
<leader>lv - Open log buffer vertically
<leader>lt - Open log buffer in a new tab
<leader>lq - Closes all visible log windows
<leader>lr - Reset log buffer leaving windows open
<leader>lR - Closes windows, deletes the buffer
<leader>ee - Evaluates the form where under cursor
<leader>er - Evaluates the outermost form under cursor
<leader>e! - Replaces the evaluated form with the result of the evaluation
@petrenkorf
petrenkorf / Capybara.md
Created June 4, 2021 03:00 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
ctags -f vendortags --verbose --languages=PHP -R vendor --php-kinds=cdfi
ctags -f tags --verbose --languages=PHP -R app --php-kinds=cdfi
@petrenkorf
petrenkorf / .vimrc
Last active February 11, 2020 13:14
Simple vim config for PHP projects (WIP)
set nocompatible
set nowrap
set autoread
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'majutsushi/tagbar'
@petrenkorf
petrenkorf / export-commit.sh
Created June 6, 2017 20:36
Export modified files and folder structure of last git commit
#!/bin/bash
git archive -o $(git rev-parse HEAD).zip HEAD $(git diff --name-only HEAD^)
@petrenkorf
petrenkorf / facebook_force_scrap.txt
Created February 20, 2017 13:15
Force Facebook to scrape your url, preventing that bug when the image isn't loaded in the first share
curl -X POST -F "id=http://your.url/to/scrap" -F "scrape=true" "https://graph.facebook.com"
@petrenkorf
petrenkorf / install.sh
Created November 25, 2016 14:48 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"