Skip to content

Instantly share code, notes, and snippets.

View patrickdappollonio's full-sized avatar
👨‍💻

Patrick D'appollonio patrickdappollonio

👨‍💻
View GitHub Profile
@patrickdappollonio
patrickdappollonio / README.md
Last active November 23, 2022 22:18
Caddy vs Nginx (my version)
@patrickdappollonio
patrickdappollonio / deployment.yaml
Created August 10, 2022 15:44
Simple Nginx + Patrick's tool deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
@patrickdappollonio
patrickdappollonio / bloatware-list.sh
Created May 1, 2021 21:33
Samsung Galaxy S21 Ultra Bloatware remover
pm uninstall --user 0 com.microsoft.appmanager
pm uninstall --user 0 com.google.android.youtube
pm uninstall --user 0 com.samsung.android.kidsinstaller
pm uninstall --user 0 com.netflix.partner.activation
pm uninstall --user 0 com.microsoft.skydrive
pm uninstall --user 0 com.samsung.android.sume.nn.service
pm uninstall --user 0 com.singtel.mysingtel
pm uninstall --user 0 com.android.chrome
pm uninstall --user 0 com.netflix.mediaclient
pm uninstall --user 0 com.facebook.katana
@patrickdappollonio
patrickdappollonio / install-tmux-ubuntu.sh
Last active July 24, 2021 08:54
Install tmux 3 from source in Ubuntu
#!/usr/bin/env bash
sudo apt update && sudo apt install -y git automake build-essential pkg-config libevent-dev libncurses5-dev byacc bison
rm -fr /tmp/tmux
git clone https://github.com/tmux/tmux.git /tmp/tmux
cd /tmp/tmux
git checkout 3.0
sh autogen.sh
./configure && make
sudo make install
@patrickdappollonio
patrickdappollonio / pi-hole.txt
Created November 25, 2019 04:22
Pi-hole custom list
0.nextyourcontent.com
006.free-counter.co.uk
006.freecounters.co.uk
0101011.com
0427d7.se
05tz2e9.com
06272002-dbase.hitcountz.net
09killspyware.com
0d79ed.r.axf8.net
0pn.ru
@patrickdappollonio
patrickdappollonio / s10plus-bloatware-list.md
Last active May 14, 2024 20:31
Samsung Galaxy S10+ bloatware list

Samsung Galaxy S10+ Bloatware list you can disable

Disclaimers:

  • This won't uninstall the application -- even when the command says so. It'll simply remove it from your username, but it will still exist in your phone.
  • With the list, YMMV. Some features might stop working after disabling certain apps. Feel free to disable just the ones you don't use.
  • You need developer options enabled to run these commands, and a USB connection to your computer, with your computer running adb shell.

Samsung Dex

pm uninstall -k --user 0 com.sec.android.desktopmode.uiservice
@patrickdappollonio
patrickdappollonio / readme.md
Last active October 16, 2019 23:18
Run a temporary, development-only elasticsearch cluster with 2 nodes

Run a temporary, development-only elasticsearch cluster with 2 nodes

Must run:

sysctl -w vm.max_map_count=262144

Then with docker-compose:

Sharing Host VPN with VirtualBox guest

Actually, this already works using VirtualBox’s NAT networking mode in your guest. What doesn’t work is resolving domain names from the guest that are only known in the VPN network.

So if you have a a domain like w3.mycompany.com that only resolves using the VPN’s DNS, you can resolve that name from your host (which is connected to the VPN), but not from your guest by default. You won’t be able to ping w3.mycompany.com from the guest. However, if you try to ping the IP address from your guest, that works.

To solve this, VirtualBox has a nice feature to allow you to set the Host DNS resolver as the DNS proxy of a VirtualBox VM. To configure this, you first need to figure out the id of your VirtualBox VM:

$ VBoxManage list vms
@patrickdappollonio
patrickdappollonio / spanish.bas
Created January 6, 2017 16:25
Cambia el idioma de los elementos de una presentación PowerPoint a Español
Sub Español()
ChangeProofingLanguageToSpanish
End Sub
Sub ChangeProofingLanguageToSpanish()
Dim j, k As Integer
Dim languageID As MsoLanguageID
' Selecciona tu lenguaje preferido y ponlo debajo. La lista
' completa está en https://msdn.microsoft.com/en-us/library/aa432635.aspx
@patrickdappollonio
patrickdappollonio / stack.go
Last active April 8, 2016 19:41
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
package main
import (
"fmt"
"sort"
)
type Stack struct {
st []int
ordered []int