Skip to content

Instantly share code, notes, and snippets.

View Pelirrojo's full-sized avatar
🤷‍♂️
Somewhere I have to keep my test code

Manuel Eusebio de Paz Carmona Pelirrojo

🤷‍♂️
Somewhere I have to keep my test code
View GitHub Profile
@Pelirrojo
Pelirrojo / .zshrc
Last active September 20, 2020 15:36 — forked from gfguthrie/.zshrc
Lazy Load Homebrew NVM but still have default aliased Node in PATH
# Based on https://gist.github.com/gfguthrie/9f9e3908745694c81330c01111a9d642#gistcomment-3143229
(...)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
DEFAULT_NODE_VER='default';
while [ -s "$NVM_DIR/alias/$DEFAULT_NODE_VER" ]; do
@Pelirrojo
Pelirrojo / 1-setup.md
Created March 30, 2020 22:31 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@Pelirrojo
Pelirrojo / web-servers.md
Created January 24, 2020 15:09 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Pelirrojo
Pelirrojo / command_format_usb_fat32_mac.sh
Last active January 22, 2020 22:17 — forked from vietdien2005/comand.sh
Bash Script to format an usb from CLI
#!/usr/bin/env bash
clear
diskutil --version >/dev/null 2>&1 || { echo >&2 "I require diskutil diskutil but it's not installed. Aborting."; exit 1; }
diskutil partitionDisk /dev/disk2 1 MBRFormat "MS-DOS FAT32" USB_NAME 805.30M
@Pelirrojo
Pelirrojo / update_git_repos.sh
Last active September 14, 2020 13:35 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
clear
CUR_DIR=$(pwd)
TOTAL=0
OK=0
KO=0
# Let the person running the script know what's going on.
@Pelirrojo
Pelirrojo / killAllContainers.sh
Last active August 20, 2017 19:23 — forked from beeva-manueldepaz/killAllContainers.sh
Script to stop and delete current running containers (useful to work with DevLab) or even images (commented by default)
#!/bin/sh
# [DevLab](https://github.com/TechnologyAdvice/DevLab)
# $sudo mv /path/to/killAllContainers.sh /usr/local/bin/killAllContainers
# $sudo chmod a+x /usr/local/bin/killAllContainers
read -p "This will stop and delete all running containers. Are you sure that you want to continue? (y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
@Pelirrojo
Pelirrojo / killAllNodeModules.sh
Last active August 20, 2017 19:22 — forked from beeva-manueldepaz/killAllNodeModules.sh
Script to clean all npm & bower current instalations in a folder recursively
#!/bin/sh
# https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
# $sudo mv /path/to/killAllNodeModules.sh /usr/local/bin/killAllNodeModules
# $sudo chmod a+x /usr/local/bin/killAllNodeModules
read -p "This will delete all node_modules & bower_componets in current and derived folders. Are you sure that you want to continue? (y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
@Pelirrojo
Pelirrojo / armagedocker.sh
Last active August 20, 2017 19:21 — forked from beeva-manueldepaz/armagedocker.sh
Script to delete all the images, containers and logs (path oriented to OsX)
#!/bin/sh
# HowTo
# Put it at /usr/local/bin/armaggeDocker.sh
# Give permissions: chmod a+x /usr/local/bin/armaggeDocker.sh
read -p "This will stop and delete all running containers and local images. Are you sure that you want to continue? (y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then