Skip to content

Instantly share code, notes, and snippets.

View mniak's full-sized avatar
🌵
Nothing is happening

Mniak mniak

🌵
Nothing is happening
View GitHub Profile
@mniak
mniak / run-go-as-script.sh
Last active March 29, 2022 21:40
Go bash runner - Add this to the beginning of the file
#!/bin/bash
# Check out the latest version at https://gist.github.com/mniak/09e5e46425ced7e3fe1c1661c24a0d8c
## CUSTOMIZATION SECTION: Type your own code below. You can add or remove lines if you need/want
package main
import (
"bytes"
"errors"
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
FROM ubuntu:impish
RUN apt-get update
RUN apt-get install -y openssh-server
RUN apt-get install -y git
# Install Terraform CLI
RUN apt-get install -y gnupg software-properties-common curl
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -
RUN apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
@mniak
mniak / mktf.sh
Last active February 11, 2022 18:45
Script to create files in all subfolders in terraform
#!/bin/bash
## Install as script in local directory
# wget https://gist.githubusercontent.com/mniak/1fd10046799c612bcdf1bf807450f08b/raw/mktf.sh; chmod +x mktf.sh
## Install as system-wide tool in a development box
# su
# curl -o /bin/mktf https://gist.githubusercontent.com/mniak/1fd10046799c612bcdf1bf807450f08b/raw/mktf.sh; chmod +x /bin/mktf
LEVELNAME_ROOT="root"
LEVELNAME_REGION="region"
LEVELNAME_ENV="env"
@mniak
mniak / Basico.md
Last active March 25, 2022 03:34
Planos de Leitura da Bíblia

☐ Antigo Testamento

☐ Gênesis

50 capítulos

☐ Gên. 1 - Gên. 9

  • Gên. 1
  • Gên. 2
# ===================================================================== #
# BASIC CONFIGURATION
# ===================================================================== #
# Default values are specified by `null` instead of the builtin default value,
# so they can be overridden by the default.yaml mechanism documented at the
# end of this file.
# Arch: "default", "x86_64", "aarch64".
# Default: "default" (corresponds to the host architecture)
import json
def modify(content):
content["Injected"] = "Luidna"
return content
def request(flow):
if flow.request and flow.request.content:
content = json.loads(flow.request.content)
new_content = modify(content)

Login

POST

https://login.folhacerta.com/api/login/postEnc

JSON

{
 "email": "seuemail@empresa.com",
@mniak
mniak / Checkpoint.bas
Created November 23, 2021 10:25
TimeTracker macro for LibreOffice
const START_COLUMN = 0
const STOP_COLUMN = 1
const MAX_ROW = 1000
function FormattedDate as string
FormattedDate = Format(Now, "yyyy-mm-dd hh:mm:ss")
end function
sub Checkpoint
let sheet = ThisComponent.CurrentController.ActiveSheet
@mniak
mniak / README.md
Last active November 23, 2021 17:54
Format Go files on pre-commit hook

Setup

curl -sL https://git.io/J1K67 | bash

What this will do?

  • Run the file setup.sh from this gist, that performs the following tasks:
  • Download the file lefthook.yml from this gist