Skip to content

Instantly share code, notes, and snippets.

View felipecrs's full-sized avatar

Felipe Santos felipecrs

View GitHub Profile
@felipecrs
felipecrs / gerrit_to_github.lua
Created May 14, 2020 22:25
Gerrit Webhook to GitHub Repository Dispatch API Converter
local json = require("json")
-- request body is in r.RequestBody, use it as any other string:
local body, err = json.decode(r.RequestBody)
if err then error(err) end
local new_body = {
event_type = "gerrit-" .. body["type"],
client_payload = body
@felipecrs
felipecrs / vbox-ga-ubuntu.md
Created April 15, 2020 17:47
Install VirtualBox Guest Additions on Ubuntu

Install

curl -fsSL https://raw.githubusercontent.com/felipecassiors/ubuntu1804-4dev/master/src/provisioners/virtualbox-guest-additions.sh | bash
@felipecrs
felipecrs / enable-or-disable-hyper-v.md
Created April 8, 2020 15:25
Enable/disable Hyper-V

Enable

Run in PowerShell as Administrator

bcdedit /set hypervisorlaunchtype auto

Disable

Run in PowerShell as Administrator

bcdedit /set hypervisorlaunchtype off
@felipecrs
felipecrs / Call.ps1
Last active March 25, 2020 01:25
Choco Install (pro)
. { iwr -useb git.io/Jv6q0 } | iex
@felipecrs
felipecrs / docker-git-bash.md
Created November 6, 2019 14:29
Use Docker for Windows on Git Bash

Edit ~/.bash_profile and add this:

# Workaround for Docker for Windows in Git Bash.
docker()
{
        (export MSYS_NO_PATHCONV=1; "docker.exe" "$@")
}
@felipecrs
felipecrs / setup-git.md
Last active October 13, 2019 18:05
Set up Git

Editor: (do not forget to tick "Add to PATH" option on VS Code installation

git config --global core.editor "code --wait"

Diff:

git config --global -e
@felipecrs
felipecrs / git-commands.md
Last active April 4, 2023 14:29
Git commands snippets

Track all files to commit

git add .

Commit

git commit

Update local branch master

git pull origin master

Update local branch master when you have commits pending push

git pull --rebase origin master

Push changes to master branch on remote

git push origin master