Skip to content

Instantly share code, notes, and snippets.

View marlonmarcello's full-sized avatar

Marlon Ugocioni Marcello marlonmarcello

View GitHub Profile
@marlonmarcello
marlonmarcello / install-go-linux.md
Last active February 14, 2025 19:20
Install Go

Check the version and file name on Go's website and just update the line bellow https://go.dev/dl/

Setup paths

export GO_VERSION=1.23.6
export GOROOT=/usr/local/go/go$GO_VERSION
export GOPATH=$HOME/go$GO_VERSION
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Keybase proof

I hereby claim:

  • I am marlonmarcello on github.
  • I am marlonmarcello (https://keybase.io/marlonmarcello) on keybase.
  • I have a public key ASAXPoS3fWCaViAssQAGAkUw7ndC913n2nF_CFUW7z78Ngo

To claim this, I am signing this object:

@marlonmarcello
marlonmarcello / change-to-new-ratio.js
Created June 9, 2017 18:36
Changing a set of values to a different ratio
function changeRatio(originalWidth, originalHeight, newWidth = 750, newHeight = 420, restrain = false) {
let ratio = w / h,
targetRatio = targetW / targetH;
let newW = targetW,
newH = newW / ratio;
if (restrain && newH > targetH) {
newH = targetH;
newW = newH * ratio;
@marlonmarcello
marlonmarcello / organize-photos.py
Created March 31, 2014 06:34 — forked from cliss/organize-photos.py
Photo management script. This script will copy photos from "sourceDir" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/. Casey Liss did more edits as you…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
import json
from datetime import datetime
######################## Functions #########################