This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a2enmod proxy_wstunnel | |
RewriteEngine On | |
RewriteCond %{HTTP:Upgrade} websocket [NC] | |
RewriteCond %{QUERY_STRING} transport=websocket [NC] | |
RewriteRule ^(.*) ws://localhost:10081/$1 [P] | |
RewriteRule ^(.*) http://localhost:10081/$1 [P] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: ${{app_name}} | |
# Required-Start: ${{start_facilities}} | |
# Required-Stop: ${{stop_facilities}} | |
# Default-Start: ${{start_runlevels}} | |
# Default-Stop: ${{stop_runlevels}} | |
# Short-Description: ${{descr}} | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
server_name dev.example.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; | |
server_name dev.example.com; | |
ssl_certificate /etc/letsencrypt/live/dev.example.com/fullchain.pem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "StartupWMClass=Slack" | sudo tee -a /var/lib/snapd/desktop/applications/slack_slack.desktop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Passenger Standalone Application Server | |
After=network.target | |
[Service] | |
Type=forking | |
PrivateTmp=yes | |
User=nginx | |
Group=nginx | |
WorkingDirectory=/srv/www/%i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo "/swapfile swap swap sw 0 0" | sudo tee -a /etc/fstab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get current value | |
xdg-mime query default inode/directory | |
#set new value | |
xdg-mime default org.gnome.Nautilus.desktop inode/directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
OPENSSH_VERSION="8.0p1" | |
sudo yum install -y epel-release | |
sudo yum install -y mock rpm-build | |
mkdir -p ~/rpmbuild/SOURCES | |
cd ~/rpmbuild/SOURCES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"default-address-pools" : [ | |
{ | |
"base" : "172.31.0.0/16", | |
"size" : 24 | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Catalina only | |
sudo spctl --master-disable | |
sudo mount -uw | |
sudo killall Finder | |
# All | |
sudo cp -R *.kext /Library/Extensions | |
# fix permissions | |
sudo chown -v -R root:wheel /System/Library/Extensions |