Skip to content

Instantly share code, notes, and snippets.

View marcosnils's full-sized avatar

Marcos Nils marcosnils

View GitHub Profile
FROM debian:bullseye
RUN --mount=type=bind,target=/root/mount/1,source=file_1 \
--mount=type=bind,target=/root/mount/2,source=file_2 \
--mount=type=bind,target=/root/mount/3,source=file_3 \
--mount=type=bind,target=/root/mount/4,source=file_4 \
--mount=type=bind,target=/root/mount/5,source=file_5 \
--mount=type=bind,target=/root/mount/6,source=file_6 \
--mount=type=bind,target=/root/mount/7,source=file_7 \
--mount=type=bind,target=/root/mount/8,source=file_8 \
@marcosnils
marcosnils / translate-menu
Created August 22, 2022 03:55
rofi translate menu
#!/bin/bash
trans="trans"
input=`rofi -dmenu -p "translate" -lines 0`
if [[ $input != "" ]]; then
cat <($trans :en+es+pt "$input" -brief) | rofi -dmenu -p "$input" -lines 2 | xclip -sel clip
fi
@marcosnils
marcosnils / Twitter mute script
Created January 7, 2022 17:05
This script adds muted words to your twitter profile to reduce noise
const delayMs = 500; // change this if you feel like its running too fast
const keywords = `ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@marcosnils
marcosnils / docker-compose.yml
Created March 19, 2021 03:49
Docker compose file to showcase profiles
version: '3'
services:
site:
build:
context: .
dockerfile: Dockerfile.build
volumes:
- ./:/srv/jekyll
@marcosnils
marcosnils / awsmfa.sh
Last active March 19, 2021 17:34
Simple script to use MFA using AWS cli.
#!/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 August 12, 2019 05:45
Markdium-Take 2, Actions!
action "build api-upload" {
uses = "actions/docker/cli@master"
args = [
"build",
"-t",
"api-upload",
"./services/api-upload",
]
}
@marcosnils
marcosnils / Markdium-YAML.yaml
Created August 12, 2019 05:45
Markdium-Take 2, Actions!
- 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 August 12, 2019 06:00
Markdium-Take 2, Actions!
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 August 12, 2019 05:45
Markdium-Take 2, Actions!
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 August 12, 2019 05:37
Markdium-Take 2, Actions!
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')