Skip to content

Instantly share code, notes, and snippets.

View nsollazzo's full-sized avatar
🔐
Don't Trust, Verify

Nicholas Sollazzo nsollazzo

🔐
Don't Trust, Verify
View GitHub Profile
@nsollazzo
nsollazzo / ingredients.json
Last active August 22, 2020 08:46
EBT ingredients
[
{
"category": "base",
"picks": [
1,
1,
2
],
"items": [
"Culiflower Rice",
@nsollazzo
nsollazzo / the_world_after_COVID_19.md
Created March 31, 2020 08:20
The world after COVID-19 SVST2020

The world after COVID-19

"Most of us probably haven't realized yet, and will soon, that things won't go back to normal after a few weeks, or even a few months. Some things will never be back" - Gordon Lichfield, Mit Technology Review

To stop the advance of the coronavirus we are radically changing our daily life: how we work, how we study, how we train, how we socialize, how we buy, how we take care of ourselves and our families.

To reduce the number of infected and dead, many governments are imposing Social Distancing, i.e., they are "forcing" people to stay at home as much as possible in order to decrease the likelihood of contact between a healthy person and an infected one. This is intended to prevent a sudden high number of sick people from saturating the health care system and causing it to collapse.

How long it will take and h

@nsollazzo
nsollazzo / index.html
Created January 14, 2020 15:55
Rick and Morty 404 page
<!--Rick&Morty-->
<div class="background-img">
<div class="space"></div>
<div class="wrapper">
<div class="img-wrapper">
<span>44</span>
</div>
<p>The page you are trying to search has been <br> moved to another universe.</p>
<button type="button">GET ME HOME</button>
</div>
@nsollazzo
nsollazzo / keybase.md
Created May 26, 2019 19:15
keybase verification

Keybase proof

I hereby claim:

  • I am nsollazzo on github.
  • I am nsollazzo (https://keybase.io/nsollazzo) on keybase.
  • I have a public key ASDWbK2ylTWkkfZ5akd7mmwqCdHxAHb16ZOJoZ2gqLNMfwo

To claim this, I am signing this object:

@nsollazzo
nsollazzo / docker-install.sh
Last active May 15, 2019 13:04
Install Docker and docker-compose on Linux
#!/usr/bin/env bash
# Install docker CE on Ubuntu & derivatives
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
@nsollazzo
nsollazzo / clone-user.sh
Created May 15, 2019 13:01
linux user clone
#!/bin/bash
SRC=$1
DEST=$2
SRC_GROUPS=$(id -Gn ${SRC} | sed "s/${SRC} //g" | sed "s/ ${SRC}//g" | sed "s/ /,/g")
SRC_SHELL=$(awk -F : -v name=${SRC} '(name == $1) { print $7 }' /etc/passwd)
useradd --groups ${SRC_GROUPS} --shell ${SRC_SHELL} --create-home ${DEST}
passwd ${DEST}
@nsollazzo
nsollazzo / docker_upgrade.sh
Created January 18, 2019 20:51
Upgrade docker-compose
#!/bin/sh
sudo apt-get remove docker-compose
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
DESTINATION=/usr/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod +x $DESTINATION
Verifying my Blockstack ID is secured with the address 1MVA4QXRCfoM3QHQqLZWFaLeusKvqPj1m3 https://explorer.blockstack.org/address/1MVA4QXRCfoM3QHQqLZWFaLeusKvqPj1m3
@nsollazzo
nsollazzo / stop_all.sh
Last active May 15, 2019 13:01
Stop and remove all docker container
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
@nsollazzo
nsollazzo / zsh_fix_upgrade.sh
Created October 26, 2018 10:56
fix to upgrade oh_my_zsh
#!/bin/sh
# Fix to the problem:
# [Oh My Zsh] Would you like to check for updates?
# Type Y to update oh-my-zsh: Y
# Upgrading Oh My Zsh
# Cannot pull with rebase: You have unstaged changes.
# Please commit or stash them.
# There was an error updating. Try again later?
cd "$ZSH" && git stash && upgrade_oh_my_zsh