Skip to content

Instantly share code, notes, and snippets.

View borgeslucaz's full-sized avatar
🏠
Working from home

Lucas Borges borgeslucaz

🏠
Working from home
View GitHub Profile
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
#!/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}"
#!/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
#!/bin/bash
NOBLANK="
@xset s noblank
@xset s off
@xset -dpms
"
# Pretty ANSI text colors
OFF="\033[0m"
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)
package watcher
import (
"git.cloudez.io/stan/config"
"git.cloudez.io/stan/database"
"fmt"
"net/http"
"time"
"os"