Skip to content

Instantly share code, notes, and snippets.

View egomesbrandao's full-sized avatar
🏠
Working from home

Emmanuel G. Brandão egomesbrandao

🏠
Working from home
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 8, 2024 05:20
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Key Function Description
--- -------- -----------
Enter AcceptLine Accept the input or move to the next line if input is missing a c...
Shift+Enter AddLine Move the cursor to the next line without attempting to execute th...
Ctrl+Enter InsertLineAbove Inserts a new empty line above the current line without attemptin...
Ctrl+Shift+Enter InsertLineBelow Inserts a new empty line below the current line without attemptin...
Escape RevertLine Equivalent to undo all edits (clears the line except lines import...
LeftArrow BackwardChar Move the cursor back one character
RightArrow ForwardChar Move the cursor forward one character
@alinefr
alinefr / check_cloudflare_lastpass.py
Last active March 1, 2017 05:21 — forked from anp/check_cloudflare_lastpass.py
Check a LastPass CSV export for potential CloudFlare vulnerabilities
"""
This is the product of me spending a few minutes trying to
assess how much of my LastPass vault is potentially vulnerable
to the recent CloudFlare issue.
It's hacky, and probably broken in some way, but it's a start.
Gist comments with improvements very welcome.
"""
@jseed
jseed / gist:5d022570ea52ee09a8f43913214496f1
Last active February 7, 2024 10:01
PowerShell command to delete all branches except master
git checkout master; git branch -D @(git branch | select-string -NotMatch "master" | Foreach {$_.Line.Trim()})
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@andrecarlucci
andrecarlucci / gist:fb1ad3caf46af7eea33cc3bf67d264d9
Created January 3, 2018 13:17
Tampermonkey script tp add #gratidao to all messages on whatsapp web #ironic
// ==UserScript==
// @name MVP Gratidao
// @namespace http://tampermonkey.net/
// @version 0.1
// @description add #gratidao to all messages on whatsapp web
// @author You
// @match https://web.whatsapp.com/
// @grant none
// ==/UserScript==
@WennderSantos
WennderSantos / TwoIntegersThatSumToEight.cs
Created November 23, 2018 17:43
Find pairs that sum to eight. O(n)
static void Main(string[] args)
{
var input = new int[]{4, 5, 2, 3, 4, 1};
var memory = new Dictionary<int, int>();
var results = new List<(int idx1, int idx2)>();
for (var i = 0; i < input.Length; i++)
{
if (memory.ContainsKey(input[i]))
results.Add((memory[input[i]], i));
function GetUrl() {
param(
[string]$orgUrl,
[hashtable]$header,
[string]$AreaId
)
# Build the URL for calling the org-level Resource Areas REST API for the RM APIs
$orgResourceAreasUrl = [string]::Format("{0}/_apis/resourceAreas/{1}?api-preview=5.0-preview.1", $orgUrl, $AreaId)
{
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34bf85}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@JustinGrote
JustinGrote / Search-Giphy.ps1
Last active December 23, 2022 16:18
Get a random gif from Giphy. ***NOTE: Invoke-TerminalGif was moved to MSTerminalSettings module***
#requires -module msterminalsettings,threadjob
###QUICKSTART
#FIRST: Run this in your Powershell Windows Terminal: Install-Module threadjob,msterminalsettings -scope currentuser
#THEN: iex (iwr git.io/invoketerminalgif)
#THEN: Get-Help Search-Giphy -Examples
#THEN: Get-Help Invoke-TerminalGif -Examples
#THEN: Search-Giphy | Format-List -prop *
#THEN: Invoke-TerminalGif https://media.giphy.com/media/g9582DNuQppxC/giphy.gif