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
@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 / 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'
###############################
# /etc/nginx/nginx.conf
###############################
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
@lcdss
lcdss / certbot-example.sh
Last active April 27, 2020 13:54
Certbot Example
#!/bash/bin
# quiet, non-interactive
./certbot certonly --standalone --quiet \
--pre-hook "sudo service nginx stop" \
--post-hook "sudo service nginx start" \
--rsa-key-size 4096
--email [email protected] \
# --cert-name # Defaults to the first domain name
-d domain.com -d domain.com xxx.domain.com \
# --domains domain.com,xxx.domain.com \
@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 [email protected].
# 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 / _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 / cloudSettings
Last active August 29, 2020 06:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-29T06:22:17.176Z","extensionVersion":"v3.4.3"}
@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()))