Skip to content

Instantly share code, notes, and snippets.

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

Lucas Cândido lcdss

🏠
Working from home
View GitHub Profile
###############################
# /etc/nginx/nginx.conf
###############################
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
@lcdss
lcdss / ssl.rules
Created May 30, 2016 04:46 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@lcdss
lcdss / Ubuntu Server Setup
Last active June 19, 2016 01:14
ubuntu-server-setup
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-add-repository -y ppa:nginx/stable
sudo apt-add-repository -y ppa:ondrej/php
# sudo apt-add-repositpry -y ppa:chris-lea/redis-server
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
@lcdss
lcdss / _hover_example.py
Created June 27, 2016 19:11 — forked from dankrause/_hover_example.py
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)

Keybase proof

I hereby claim:

  • I am lcdss on github.
  • I am lucasc (https://keybase.io/lucasc) on keybase.
  • I have a public key whose fingerprint is D9C9 7FD6 614A CDBD 664E 3B9C FB81 9C52 33DE BEFA

To claim this, I am signing this object:

@lcdss
lcdss / setup
Last active November 6, 2016 22:28
Elementary OS - PHP/Node.js Developers
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-add-repository -y ppa:philip.scott/elementary-tweaks
sudo apt-add-repository -y ppa:git-core/ppa
sudo apt-add-repository -y ppa:ondrej/php
sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:mc3man/mpv-tests
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
@lcdss
lcdss / rename_phoenix_project.sh
Created March 10, 2018 14:11 — forked from kumekay/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@lcdss
lcdss / break.py
Created April 4, 2018 02:49 — forked from obfusk/break.py
python equivalent of ruby's binding.pry
import code; code.interact(local=dict(globals(), **locals()))
@lcdss
lcdss / logslaravel.sh
Created August 23, 2018 00:59 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@lcdss
lcdss / emby-server.service
Last active September 15, 2018 01:25
Ubuntu 18.04 Setup
[Unit]
Description=Emby Media Server
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a emby-server
ExecStop=/usr/bin/docker stop -t 5 emby-server