Skip to content

Instantly share code, notes, and snippets.

View nicholashoule's full-sized avatar
📖
🎲 🎲 🎲 🎲 🎲

Nicholas Houle nicholashoule

📖
🎲 🎲 🎲 🎲 🎲
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use Term::ANSIColor qw(:constants);
use Data::Printer;
$| = 1; # turn off the buffering of STDOUT
my ($choice, $times, $key, $value, @hash);
my @array = 0..9;
#!/bin/bash
# Built/tested on:
# NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)"
# libgit2/libgit2
# https://github.com/libgit2/libgit2/releases
# libgit2 is a portable, pure C implementation of the Git core methods
# provided as a re-entrant linkable library with a solid API, allowing
# you to write native speed custom Git applications in any language with bindings.
libgit2='v0.25.0.tar.gz'
libgit2ver='0.25.0'
@nicholashoule
nicholashoule / cherry-pick
Created January 8, 2019 17:49
Cherry pick a merge and create a pull request for the master branch
git checkout master
git pull
git checkout -b patch/mypatch
git fetch origin master
git reset --hard origin/master
git cherry-pick -m 1 [commit-hash]
git push origin patch/mypatch
@nicholashoule
nicholashoule / gitbranches.md
Last active September 20, 2024 16:25
Git prune and delete merged local branches

Git prune and delete merged local branches

Prune
git remote prune origin --dry-run
git remote prune origin
@nicholashoule
nicholashoule / rsync.md
Last active June 6, 2019 19:33
Rsync and SSH

Rsync and SSH

PULL FROM REMOTE HOST (DOWNLOAD):
rsync -ravz -e ssh [email protected]:/opt/ /home/user/directory/
rsync -avz -e "ssh -A -i /home/user/.ssh/id_rsa" [email protected]:/data /home/user/projects/data
@nicholashoule
nicholashoule / route.md
Last active June 6, 2019 19:39
Route command

Route command

route

route
Add route:

sha512 hash

Algorithm used:
$1$,  MD5
$2a$, Blowfish
$2y$, Blowfish
$5$,  SHA-256
$6$,  SHA-512
@nicholashoule
nicholashoule / networkgw.md
Last active November 26, 2019 18:42
Linux Network information

Linux Network information:

Default gateway:
ip route | awk '/^default/ { print $3 }'
IP:

sed

NAME
     sed -- stream editor

SYNOPSIS
     sed [-Ealn] command [file ...]
 sed [-Ealn] [-e command] [-f command_file] [-i extension] [file ...]