Skip to content

Instantly share code, notes, and snippets.

Marcos Nils marcosnils

Block or report user

Report or block marcosnils

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
@marcosnils
marcosnils / awsmfa.sh
Last active Mar 14, 2020
Simple script to use MFA using AWS cli.
View awsmfa.sh
#!/bin/bash
# shellcheck disable=SC2102
set -euo pipefail
renew_creds() {
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
@marcosnils
marcosnils / Markdium-HCL.hcl
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-HCL.hcl
action "build api-upload" {
uses = "actions/docker/cli@master"
args = [
"build",
"-t",
"api-upload",
"./services/api-upload",
]
}
@marcosnils
marcosnils / Markdium-YAML.yaml
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-YAML.yaml
- name: docker build
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: docker build --build-arg NPM_TOKEN=$NPM_AUTH_TOKEN -t my-image .
@marcosnils
marcosnils / Markdium-YAML.yaml
Last active Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-YAML.yaml
api-upload:
name: api-upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: build api-upload
run: docker build --build-arg "IMAGE_RELEASE_VERSION=$(echo
${{ github.ref }} | cut -f3 -d'/')" -t api-upload ./services/api-upload
- name: tag
if: contains(github.ref, 'tags')
@marcosnils
marcosnils / Markdium-YAML.yaml
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-YAML.yaml
jobs:
my-job
name: my-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Dump GitHub context # This step is for debug purpose
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
@marcosnils
marcosnils / Markdium-YAML.yaml
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-YAML.yaml
1 api-upload:
2 name: api-upload
3 runs-on: ubuntu-latest
4 steps:
5 - uses: actions/checkout@master
6 - name: build api-upload
7 run: docker build --build-arg "IMAGE_RELEASE_VERSION=$(echo
8 ${{ github.ref }} | cut -f3 -d'/')" -t api-upload ./services/api-upload
9 - name: tag
11 if: contains(github.ref, 'tags')
@marcosnils
marcosnils / Markdium-YAML.yaml
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-YAML.yaml
jobs:
my-job
name: my-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Dump GitHub context # This step is for debug purpose
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
@marcosnils
marcosnils / Markdium-Shell.bash
Created Aug 12, 2019
Markdium-Take 2, Actions!
View Markdium-Shell.bash
action "build api-upload" {
uses = "actions/docker/cli@master"
args = [
"build",
"-t",
"api-upload",
"./services/api-upload",
]
}
View tsplit.sh
#!/bin/bash
# tsplit
# @marcosnils
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$ARGS" ]; then
@marcosnils
marcosnils / Dockerfile
Last active Feb 23, 2018
Dockerfile to run selenium headless tests
View Dockerfile
FROM debian:jessie
RUN apt update && apt install -y firefox-esr \
&& wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz \
&& tar -C /usr/bin/ -xvf geckodriver-v0.19.1-linux64.tar.gz && rm geckodriver-v0.19.1-linux64.tar.gz \
&& wget https://download-installer.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-60.0a1.en-US.linux-x86_64.tar.bz2 \
&& tar -C /opt/ -xvf firefox-60.0a1.en-US.linux-x86_64.tar.bz2 \
&& rm /usr/bin/firefox && ln -s /opt/firefox/firefox /usr/bin/firefox
You can’t perform that action at this time.