Skip to content

Instantly share code, notes, and snippets.

@andrewodri
andrewodri / install.sh
Last active May 23, 2022 18:15
Force dark mode in High Sierra
#!/bin/bash
# https://www.howtogeek.com/fyi/enable-dark-mode-in-high-sierra-sort-of/
# https://medium.com/@n1kk/how-to-tweak-macos-mojave-dark-mode-per-app-a5fab0574691
# https://stackoverflow.com/questions/52562383/is-there-a-way-to-toggle-dark-mode-on-off-for-individual-apps-in-macos-mojave
defaults write -g NSWindowDarkChocolate -bool TRUE
defaults write -g NSRequiresAquaSystemAppearance -bool FALSE
defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool FALSE
defaults write com.google.Chrome _NSSystemAppearanceOverride DarkAppearance
@mjuric
mjuric / DockerUserNamespacesOnCentOS74.md
Last active September 6, 2023 18:31
Setting up Docker with user namespaces on CentOS 7.4

Setting up Docker with user namespaces on CentOS 7.4

The procedure below has been tested on a Digital Ocean VM with CentOS 7.4

# Install docker from RHEL’s standard repos
yum install -y docker

#
# We’ll activate the ‘user namespaces’ feature that defends against
@yagonobre
yagonobre / lambda_invalidate_cdn.py
Last active April 12, 2024 13:25
Invalidate Cloudfront
from __future__ import print_function
import boto3
import time
def lambda_handler(event, context):
path = "/" + event["Records"][0]["s3"]["object"]["key"]
bucket_name = event["Records"][0]["s3"]["bucket"]["name"]
client = boto3.client('s3')
@bozdoz
bozdoz / install-wp.sh
Created June 16, 2017 00:30
Wordpress Full Install
#!/bin/bash
rm latest.tar.gz
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
if [[ $1 ]]; then
mv wordpress $1
cd $1
else
@Unitech
Unitech / cat proc-cpuinfo
Last active April 11, 2019 09:44
Benchmark PM2 vs HAPROXY vs NGINX - Simple HTTP Node.js application
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
stepping : 4
microcode : 0x23
cpu MHz : 2457.468
cache size : 3072 KB
@CyberPunkCodes
CyberPunkCodes / killadobe.sh
Last active November 21, 2022 16:41
Mac Bash script to kill Adobe Create Cloud and other processes that Adobe forces on us.
#!/bin/bash
echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n"
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist
echo "\n\n--- Done! ---\n\n"
@LeonardoGandini
LeonardoGandini / wpdwna.sh
Last active March 23, 2025 19:38
Automate WordPress and wp-config.php creation
# Download Latest Wordpress archive from WP org
wget https://wordpress.org/latest.tar.gz
#Extract the archive showing the progress
pv latest.tar.gz | tar xzf - -C .
#Copy the content of WP Salts page
WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -)
#generate a random string; lower and upper case letters + numbers; maximun 9 characters
@andreibosco
andreibosco / creative-cloud-disable.md
Last active December 19, 2024 08:28
disable creative cloud startup on mac
@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 16, 2025 13:33
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@gerbsen
gerbsen / ssh_agent_start.fish
Last active July 16, 2024 16:52 — forked from schaary/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null