Skip to content

Instantly share code, notes, and snippets.

View ernestohs's full-sized avatar
🐙
coding in progress

Ernesto Herrera Salinas ernestohs

🐙
coding in progress
View GitHub Profile
@ernestohs
ernestohs / alias.sh
Last active December 27, 2023 19:21
how lazy I am
alias push='git push origin $(git rev-parse --abbrev-ref HEAD)'
alias pull='git pull --recurse-submodules origin $(git rev-parse --abbrev-ref HEAD)'
alias s="git status -s"
alias c="git commit -m "
alias a='git add . && git status -s'
alias l='git log --oneline --all --graph --decorate'
alias gb='git fetch && git checkout '
alias undo='git checkout --'
alias reset='git reset --hard HEAD~1'
alias clean='git clean -dnx'
@ernestohs
ernestohs / new-computer-setup.ps1
Created June 30, 2022 03:27
For boxstarter.org to be consumed
##########################################################################
# Disable UAC (temporarily)
##########################################################################
Disable-UAC
##########################################################################
# Windows settings
##########################################################################
@ernestohs
ernestohs / Lista.md
Last active January 31, 2022 03:20
👪 Cosas que quiero hacer con mi hijo
@ernestohs
ernestohs / nano-http-server.ps1
Created September 9, 2015 18:15
Nano Web Server, Less than 50 lines of code
$routes = @{
"/about" = { return '<html><body>Quick and dirty HTTP Server</body></html>' };
"/status" = { return '<html><body>Server is up and running!</body></html>' };
"/home" = { return Get-Content -Path "index.html" | Out-String };
# Add new paths here
}
$url = 'http://localhost:8080/'
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add($url)
@ernestohs
ernestohs / Save for later without loose local changes
Created December 27, 2016 23:27
Stash without revert/reset your local changes
$ git stash && git stash apply
@ernestohs
ernestohs / NewComputer.ps1
Last active March 14, 2021 23:30
My computer setup
Update-ExecutionPolicy Unrestricted -Force
# Base
cinst BoxStarter.Chocolatey
cinst BoxStarter.WinConfig
# Chocolatey
cinst ChocolateyPackageUpdater
# Windows 8.1 Settings and Options
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html data-is-hyperloop="true" lang="en" dir="ltr" xmlns:fb="http://ogp.me/ns/fb#" class="js-focus-visible">
<head>
<base
href="https://www.airbnb.com/s/California--United-States/homes?place_id=ChIJPV4oX_65j4ARVW8IJ6IJUYs&refinement_paths%5B%5D=%2Fhomes&refinement_path=%2Fhomes&tab_id=home_tab&reset_filters=true&checkin=2020-10-19&checkout=2020-10-23&adults=1&children=0&infants=0&search_type=autosuggest">
<link rel="icon" data-savepage-href=""
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAB0VBMVEUAAAD7YGT7YWP3ZGfxZmr7X2L4Ymb9YmP/XF/3YmX9YmP/X2H7XmH8YGL+XmD7X2H8XmD+Xl/gdHffb3P/W17+XV/ZXWD7YGDcY2b/XF7bWVz+XF7lbnHeZGfcZmrkZWj/XF/5XF77amf+XV7fZmnfdXjkcHPeYWX7XF//XV3/X13/Xl75bW7WXWD7ZmXzcXPyWVz9ZmbvYGLYbXDqXmHOZWj+ZGDcU1fXb3LvWVzvXWDzWV3/W17TVFf9bWrtV1vcVlr+ZF/UU1TVWFrJZmrlWl77bWu/XmHnaW38amuzTE/IT1O4V1v6fHu3U1bwYGSuRkreTlLhT1PoUlblUFTuVVjxVVnkUFXpUlbjT1T0WljdTVHrU1fpU1bYTE/sU1ftU1jhTlPcTVHqU1fzV1n4WFvSSU39Wl3OSEv8W13VS07qUlftVVffTlLiT1P1V1vbTVH
@ernestohs
ernestohs / sheep.mapreduce.js
Created September 11, 2018 01:53
Counting sheep
function(keys, sheeps, rereduce) {
return sum(sheeps);
}
@ernestohs
ernestohs / books.md
Last active June 24, 2018 01:59
Books to read to my son
  • Readed

    The Wonderful Wizard of Oz

    by Lyman Frank Baum

    photo

  • Readed

    The last unicorn

    by Peter S. Beagle

@ernestohs
ernestohs / computer-specs.md
Last active June 4, 2018 18:18
My Computer Specs

Computer Specs

Component Model Specs Notes
RAM Memory DDR4-SDRAM 32 GB 4 x 8 GB / 2 x16 GB
Processor Intel Core i7 3.70 GHz 12M Cache, up to 4.70 GHz
Memory Speed 2133.00
Hard Drive 1000 GB HDD
Graphics CP Geforce GTX