Skip to content

Instantly share code, notes, and snippets.

View chepetime's full-sized avatar
🎯
Focusing

José M. Gulias Lugo chepetime

🎯
Focusing
View GitHub Profile

Source: Oh, shit, git!

Oh shit, I did something terribly wrong, please tell me git has a magic time machine!?!

git reflog
# you will see a list of every thing you've done in git, across all branches!
# each one has an index HEAD@{index}
# find the one before you broke everything
git reset HEAD@{index}
@chepetime
chepetime / PixelGrid.vue
Last active September 19, 2018 05:14
Make any image a pixelated version of itself
<template>
<div class="Home">
<div class="Grid">
<div
v-for="i in (tiles*tiles)"
v-bind:key="i">
</div>
</div>
@chepetime
chepetime / Heavy Duty Git Cheatsheet.md
Last active November 20, 2022 13:40
Heavy Duty Git Cheatsheet - Useful git commands for common problems.

Heavy Duty git Cheatsheet

Solve common git scenarios and problems!

Basic workflow

# add elements
git add -A
@chepetime
chepetime / cut_video.sh
Created December 4, 2018 15:54
Script for cutting a video using ffmpeg into 15 seconds segments. This configuration works well for instagram stories.
## Install Homebrew - Instructions: https://brew.sh
## Check brew is avaliable
which brew
# if it returns: /usr/local/bin/brew
# it means that homebrew is installed.
# if it returns: brew not found
# it means homebrew is not installed.
@chepetime
chepetime / metatags_base.html
Created December 27, 2018 19:05
Base HTML metatags
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Basic SEO -->
<title>Título</title>
79 lines (61 sloc) 3.27 KB
## Start staks
echo Start
## Install devtools
xcode-select --install
## Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@chepetime
chepetime / get_file_sizes_order.sh
Created April 8, 2019 21:27
Get files from a directory ordered by size
du -hs --apparent-size * | sort -h
@chepetime
chepetime / Transform PDF to mp3.md
Last active April 24, 2019 15:57
Transform PDF to mp3

Transform PDF to mp3

Install dependencies

brew install Caskroom/cask/xquartz xpdf
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac

Transform the pdf to mp3 audio

@chepetime
chepetime / macos-verbose-wifi-diagnostics.md
Created May 30, 2019 03:18
macOs Verbose WIFI Diagnostic

Verbose WIFI Diagnostic

Information on the current state of the wifi:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I

Scan the available wifis and give a full report:

# Preview webp images
curl -L https://raw.github.com/emin/WebPQuickLook/master/install.sh | sh