Skip to content

Instantly share code, notes, and snippets.

View neuronsoverflow's full-sized avatar
💭
Chilling

neurons://overflow neuronsoverflow

💭
Chilling
View GitHub Profile
#! /bin/sh
### BEGIN INIT INFO
# Provides: mydaemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mydaemon does stuff
# Description: this is an actual executable script, and should be saved in
# /etc/init.d/mydaemon.
#!/bin/bash
echo "Please wait..."
# Look for suspect files
/usr/bin/find -E {,~}/Applications -iregex '.*\.app\/(.*\.DS_Store|Icon.{1})$' > /tmp/.suspectfiles
# Check suspect files
appsCounter=0
while read path; do
@neuronsoverflow
neuronsoverflow / disable.sh
Created January 2, 2020 18:35 — forked from junkblocker/disable.sh
Disable bunch of #$!@ in Catalina
#!/bin/bash
if [[ "$(sw_vers -productVersion)" != 10\.15* ]]; then
echo "This is only meant to run on macOS 10.15.* Catalina" >&2
exit 1
fi
reply=
printf "Are you pretty damn sure you want to run this? (Yes/No) "
read -r reply
[[ $reply != Yes ]] && exit 1
@neuronsoverflow
neuronsoverflow / disable.sh
Created January 2, 2020 18:33 — forked from mtunjic/disable.sh
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@neuronsoverflow
neuronsoverflow / disable.sh
Created January 2, 2020 18:33
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
#!/bin/bash
set -e
set -o pipefail
NGINX_PREVIOUS_VER=$(2>&1 nginx -V -t | xargs -n1)
sudo wget https://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
apt update -y
apt install -y --reinstall nginx-module-geoip linux-headers-generic linux-image-generic linux-generic geoip-database libgeoip-dev libgeoip1

Keybase proof

I hereby claim:

  • I am neuronsoverflow on github.
  • I am neuronsoverflow (https://keybase.io/neuronsoverflow) on keybase.
  • I have a public key ASB83TrXFnbB2_SWoMdlIZQiT35Kn-EnHuVQ_Fhr9w4Fywo

To claim this, I am signing this object: