Skip to content

Instantly share code, notes, and snippets.

View felipepodesta's full-sized avatar
👨‍💻
Stairway To Heaven

Felipe Podestá felipepodesta

👨‍💻
Stairway To Heaven
View GitHub Profile
@felipepodesta
felipepodesta / wsl_provision.sh
Created November 16, 2021 03:27 — forked from ctudorache87/wsl_provision.sh
Provisioning script for PHP & Node development environment on WSL
#!/bin/bash
# Provisioning script for PHP & Node development environment on WSL
if [ "$EUID" -ne 0 ]
then echo "Please run this script as root"
exit
fi
# create work dir
@felipepodesta
felipepodesta / win10-11.md
Created November 16, 2021 03:27 — forked from ruandre/win10-11.md
After installing Windows 10/11

After installing Windows 10/11

Install:

You can use https://uupdump.net/ to build up an ISO file (even from Linux or Mac, the options enable you to keep the file size down) and just drop into https://github.com/ventoy/Ventoy and you're good to go.

If you're already running Windows you can do "Reset this PC" for a more convenient ISO download option.

Personal preference:

  • Disconnect from the internet before install.
@felipepodesta
felipepodesta / windows_developer_setup.md
Created November 16, 2021 03:27 — forked from n0mer1/windows_developer_setup.md
My quick developer setup after reimaging and company auto-enrollment for Windows 10.

🚀 Setup for DEV

Set up your Windows system with WSL so that you can start developing right away and the most important tools are installed.

Of course, it is always individual which tools are needed and what to configure. So what I have described fits best for me and the most important things are included. That does not mean that this must fit for you exactly this way and that everything works. Just think about every step a little bit, make modifications if necessary and then it should work for you, so that you have a cool basic setup for development as well. Have fun! 😊

Table of content:

@felipepodesta
felipepodesta / postinstall.sh
Created November 16, 2021 03:25 — forked from fnichol/postinstall.sh
Ubuntu Postinstall
#!/usr/bin/env bash
# **postinstall.sh** is a script executed after Debian/Ubuntu has been
# installed and restarted. There is no user interaction so all commands must
# be able to run in a non-interactive mode.
#
# If any package install time questions need to be set, you can use
# `preeseed.cfg` to populate the settings.
#
# To run:
@felipepodesta
felipepodesta / ubuntu.sh
Created November 16, 2021 03:25 — forked from restrepo/ubuntu.sh
Ubuntu postinstall
#!/usr/bin/env bash
#Postinstall for Ubuntu 9.10 -- 14.04
#Install as root!
#after sudo su
echo "================================================================"
echo "Update and upgrade the system"
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude -y safe-upgrade
echo "================================================================"
@felipepodesta
felipepodesta / clean.sh
Created November 16, 2021 03:24 — forked from sonuame/clean.sh
Ubuntu Cleanup
#!/bin/sh -eux
# Delete all Linux headers
dpkg --list \
| awk '{ print $2 }' \
| grep 'linux-headers' \
| xargs apt-get -y purge;
# Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but
# keeps the current kernel and does not touch the virtual packages,
# e.g. 'linux-image-generic', etc.
dpkg --list \
@felipepodesta
felipepodesta / ubuntucleanupspace.sh
Created November 16, 2021 03:24 — forked from simonfongnt/ubuntucleanupspace.sh
ubuntu clean up space
rotate the files first so that recent entries are moved to inactive files
journalctl --rotate
Retain only the past two days:
journalctl --vacuum-time=30d
Retain only the past 500 MB:
journalctl --vacuum-size=500M
@felipepodesta
felipepodesta / clearspace
Created November 16, 2021 03:23 — forked from jkehelwala/clearspace
Clean space in Ubuntu
#!/bin/bash
## References: https://itsfoss.com/free-up-space-ubuntu-linux/
function remove_snap_revs() {
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
########################################################################################################################
# Inspired by:
# https://gist.github.com/andromedarabbit/7b2ef08f0db29a728c9899163f359c88
# Usage:
# wget -qO- <RAW_URL> | sh <aws-profile> <aws-vpc-id> <sg-name>
@felipepodesta
felipepodesta / jq-cheetsheet.md
Created November 16, 2021 01:58 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq