Skip to content

Instantly share code, notes, and snippets.

Avatar

Lucas Cândido lcdss

View GitHub Profile
View php-nginx-server-config-example
###############################
# /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 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
View ssl.rules
# 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 Jun 19, 2016
ubuntu-server-setup
View 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 Jun 27, 2016 — forked from dankrause/_hover_example.py
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
View _hover_example.py
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)
View keybase.md

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 Nov 6, 2016
Elementary OS - PHP/Node.js Developers
View setup
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 Mar 10, 2018 — forked from kumekay/rename_phoenix_project.sh
rename a phoenix 1.3 project
View rename_phoenix_project.sh
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@lcdss
lcdss / break.py
Created Apr 4, 2018 — forked from obfusk/break.py
python equivalent of ruby's binding.pry
View break.py
import code; code.interact(local=dict(globals(), **locals()))
@lcdss
lcdss / logslaravel.sh
Created Aug 23, 2018 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
View logslaravel.sh
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 Sep 15, 2018
Ubuntu 18.04 Setup
View emby-server.service
[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