This file contains 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 vi /etc/sysctl.conf | |
# Add the following to sysctl.conf: | |
# Decrease TIME_WAIT seconds | |
net.ipv4.tcp_fin_timeout = 30 | |
# Recycle and Reuse TIME_WAIT sockets faster | |
net.ipv4.tcp_tw_recycle = 1 |
This file contains 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/sh | |
APP_URL="abcdef.com.br" | |
ROOT_PATH="/srv/${APP_URL}/www/" | |
RELEASES="${ROOT_PATH}/releases" | |
CURRENT="${ROOT_PATH}/current" | |
GIT_URL="https://github.com/borgeslucaz/modern-go-application.git" | |
NEW_RELEASE=$(date +%s) | |
NEW_RELEASE_PATH="${ROOT_PATH}/releases/${NEW_RELEASE}" |
This file contains 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/sh | |
APP_URL="abcdef.com.br" | |
ROOT_PATH="/srv/${APP_URL}/www/" | |
RELEASES="${ROOT_PATH}/releases" | |
CURRENT="${ROOT_PATH}/current" | |
GIT="https://github.com/borgeslucaz/modern-go-application.git" | |
NEW_RELEASE=$(date +%s) | |
# Create new release |
This file contains 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 | |
NOBLANK=" | |
@xset s noblank | |
@xset s off | |
@xset -dpms | |
" | |
# Pretty ANSI text colors | |
OFF="\033[0m" |
This file contains 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
import urllib | |
import json | |
import requests | |
def download_img(url, filename): | |
response = requests.get(url) | |
filename = filename.replace('/', '') | |
if response.status_code == 200: | |
with open(F"/srv/nightwing.cloudezapp.io/www/sara_thumbs/{filename}.jpg", 'wb') as f: | |
f.write(response.content) |
This file contains 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
package watcher | |
import ( | |
"git.cloudez.io/stan/config" | |
"git.cloudez.io/stan/database" | |
"fmt" | |
"net/http" | |
"time" | |
"os" |