Skip to content

Instantly share code, notes, and snippets.

View iranjunior's full-sized avatar
🖥️
Coding

Iran Junior iranjunior

🖥️
Coding
View GitHub Profile
@iranjunior
iranjunior / post-merge
Created September 1, 2020 19:44 — forked from sindresorhus/post-merge
Git hook to install npm dependencies after a `git pull`. Run `chmod +x post-merge` and put it in `.git/hooks/`. Though could really do whatever.
#!/bin/sh
npm install
@iranjunior
iranjunior / snippets.md
Created July 8, 2020 17:20 — forked from bernardomafra/snippets.json
Snippets for Visual Studio Code

VSCode Custom Snippets

Para criar snippets personalizados para o seu Visual Studio Code, clique em File/Preferences/User Snippets.

Em seguida, escolha:
'New Global Snippets File' para criar snippets de maneira global
'New Snippets File for [REPOSITORY_NAME]' para criar snippets somente para o repositório atual

[RSL] React Stateless Component:

@iranjunior
iranjunior / curl.md
Created April 6, 2020 16:11 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

{
"estados": [
{
"cod": "1",
"sigla": "AC",
"nome": "Acre",
"cidades": [
{
"cod": "53",
"uf": "Acrelândia"
@iranjunior
iranjunior / nginx_client_cn_auth.conf
Created March 19, 2020 12:15 — forked from schtobia/nginx_client_cn_auth.conf
CN-based client authentification with nginx. This emulates Apache's SSLRequire (%{SSL_CLIENT_S_DN_CN} in {"Really Me"})
map $ssl_client_s_dn $ssl_client_s_dn_cn {
default "";
~/CN=(?<CN>[^/]+) $CN;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
@iranjunior
iranjunior / nginx_client_cn_auth.conf
Created March 19, 2020 12:15 — forked from schtobia/nginx_client_cn_auth.conf
CN-based client authentification with nginx. This emulates Apache's SSLRequire (%{SSL_CLIENT_S_DN_CN} in {"Really Me"})
map $ssl_client_s_dn $ssl_client_s_dn_cn {
default "";
~/CN=(?<CN>[^/]+) $CN;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
@iranjunior
iranjunior / enzyme_render_diffs.md
Created March 18, 2020 02:30 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render