Skip to content

Instantly share code, notes, and snippets.

View marcelaraujo's full-sized avatar

Marcel Araujo marcelaraujo

View GitHub Profile
@marcelaraujo
marcelaraujo / goGetPrivate.md
Created October 6, 2023 11:08 — forked from StevenACoffman/goGetPrivate.md
How to `go get` private repos using SSH key auth instead of password auth.

Set GOPRIVATE to match your github organization

Cloning the repo using one of the below techniques should correctly but you may still getting an unrecognized import error.

As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:

GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME

The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.

How to go get private repos using SSH key auth instead of password auth.

@marcelaraujo
marcelaraujo / Jenkinsfile
Created February 9, 2021 12:14 — forked from docwhat/Jenkinsfile
Example pipeline usage of the Jenkins Mask Passwords plugin
// Requires https://plugins.jenkins.io/mask-passwords to run
/**
* Runs code with secret environment variables and hides the values.
*
* @param varAndPasswordList - A list of Maps with a 'var' and 'password' key. Example: `[[var: 'TOKEN', password: 'sekret']]`
* @param Closure - The code to run in
* @return {void}
*/
def withSecretEnv(List<Map> varAndPasswordList, Closure closure) {
@marcelaraujo
marcelaraujo / macos-port-forward.sh
Created November 30, 2020 10:22 — forked from gregjhogan/macos-port-forward.sh
local port forwarding on macOS
#!/bin/bash
ifconfig lo0 alias 127.0.1.1
ifconfig lo0 alias 127.0.10.1
# clear rules
pfctl -F all -f /etc/pf.conf
# set rules
echo "
@marcelaraujo
marcelaraujo / macos-port-forward.sh
Created November 30, 2020 10:22 — forked from gregjhogan/macos-port-forward.sh
local port forwarding on macOS
#!/bin/bash
ifconfig lo0 alias 127.0.1.1
ifconfig lo0 alias 127.0.10.1
# clear rules
pfctl -F all -f /etc/pf.conf
# set rules
echo "
@marcelaraujo
marcelaraujo / kill_all.groovy
Last active October 21, 2020 14:30 — forked from steven-terrana/kill_all.groovy
[Kill All Builds] kill all queued and running jobs #Jenkins
import java.util.ArrayList
import hudson.model.*;
// Remove everything which is currently queued
def q = Jenkins.instance.queue
for (queued in Jenkins.instance.queue.items) {
q.cancel(queued.task)
}
// stop all the currently running jobs

OpenSSL Playground

Verify downloaded file
➜  openssl dgst -sha256 openssl-1.1.1.tar.gz
SHA256(openssl-1.1.1.tar.gz)= 2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
➜  cat openssl-1.1.1.tar.gz.sha256
2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
RSA Public Key pad and encrypt
@marcelaraujo
marcelaraujo / App.js
Created November 13, 2018 13:22
REACT & REDUX & ROUTER & HMR
// src/App.js
import React from 'react';
import {Provider} from 'react-redux';
import {ConnectedRouter} from 'react-router-redux';
import {history} from './history';
import {store} from './redux/store';
import {Root} from './components/Root';
@marcelaraujo
marcelaraujo / Redux-saga module example.md
Created November 13, 2018 13:22 — forked from sbsrnt/Redux-saga module example.md
redux-saga module example

Gist contains example files for redux-saga user(GET) module. The structure of redux for included files in this gist:

redux
├── user                          # Module name
│   ├── __tests__                 # Directory for redux module tests
│   │   ├── actions.test.js       # Action tests
│   │   └── saga.test.js          # Saga tests
│   ├── actions.js                # Module actions (f/e.: fetchUserRequest, fetchUserSuccess)
│   ├── reducer.js                # Module reducer
@marcelaraujo
marcelaraujo / bash-cheatsheet.sh
Created January 23, 2018 15:35 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04