Skip to content

Instantly share code, notes, and snippets.

View pulimento's full-sized avatar

Javi Pulido pulimento

View GitHub Profile
@pulimento
pulimento / github-email-history.zsh
Last active February 19, 2024 11:58
Rewrite your Git history to change the author's email. Read the inline description first!
#!/bin/zsh
# ==============================================================================
# Script Name: github-email-history.zsh
#
# Description: Script to rewrite your Git history to change the author email for commits with the old email.
# Please note that your remotes will be removed, and you will need to add them back manually.
# First of all, it's recommended to configure your Git user.email to the new email, at least on the working repo.
#
# Usage: script-name.zsh <folder-path> [--force]
#
@pulimento
pulimento / itermprofile.json
Created February 16, 2024 11:17
iterm custom profile
{
"Right Option Key Sends" : 0,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.011764706112444401,
"Color Space" : "sRGB",
"Blue Component" : 0.72156864404678345,
"Alpha Component" : 1,
@pulimento
pulimento / AHKMediaControls.ahk
Created August 31, 2021 11:14
Configure Media Shortcuts with AutoHotKey. Run it in a hidden cmd window
;MEDIA CONTROL SHORTCUTS, TO BE USED WITH AUTOHOTKEY
;"CTRL + ALT + PageUp" for previous
^!PgUp::Media_Prev
;"CTRL + ALT + PageDown" for next
^!PgDn::Media_Next
;"CTRL + ALT + HOME" for play/pause
^!Home::Media_Play_Pause
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
@pulimento
pulimento / reduce_mobile_videos.cmd
Last active January 10, 2021 18:06
Re-encode mobile-recorded videos to archive them at a lower bitrate. Using FFMPEG
@echo off
REM
REM First parameter: Working input (can be a file or a directory)
REM Second parameter: Extra action. Possible values: [ ROTATECCW ]
REM
SET INPUT=%1
SET CURRENTDIR=%cd%
SET EXTRA_ACTION=%2
@pulimento
pulimento / update-pwsh.ps1
Created December 28, 2020 07:07
Update Powershell on Windows
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
#!/bin/sh
# make sure you have imagemagick installed: brew install imagemagick
# your app_icons.sh file should have the correct permissions: run `chmod 775 app_icons.sh` in your terminal from where you put this file
# put your `my_icon.png` next to this file and run ./app_icons.sh to export your app icons
x=my_icon.png
y=${x%.*}
# delete the export directory so we start clean
@pulimento
pulimento / sketch.ino
Created May 22, 2020 19:43
Quick and dirty script to test WS2812B strip on Arduino
#include <FastLED.h>
#define LED_PIN 5
#define NUM_LEDS 21
#define BRIGHTNESS 64
#define LED_TYPE WS2812
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 80 // was 100
@pulimento
pulimento / README.MD
Created February 19, 2020 18:06
Env Init Windows 10
@pulimento
pulimento / clean.ps1
Created January 29, 2020 09:08
Clear VS project folder
# Define files and directories to delete
$include = @("*.suo","*.user","*.cache","*.docstates","bin","obj","*.GhostDoc.xml")
# Define files and directories to exclude
$exclude = @()
$items = Get-ChildItem . -recurse -force -include $include -exclude $exclude
if ($items) {
foreach ($item in $items) {