Skip to content

Instantly share code, notes, and snippets.

View douglasresende's full-sized avatar
💡
I'll do my best

Douglas douglasresende

💡
I'll do my best
  • San Francisco, CA
View GitHub Profile
@douglasresende
douglasresende / platformio.txt
Created September 6, 2016 02:52 — forked from probonopd/platformio.txt
Using PlatformIO
sudo apt-get -y install python-pip git
sudo pip install -U platformio
platformio -f init --ide clion --board esp12e
sudo chmod 777 /dev/tty*
platformio serialports list
cp ~/.platformio/packages/framework-arduinoespressif/libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino src/
# Set upload speed from 115200 to 921600
echo "upload_speed=921600" >> platformio.ini
@douglasresende
douglasresende / digital_ocean_setup.md
Created March 9, 2016 21:49 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
@douglasresende
douglasresende / nginx.conf
Created September 27, 2015 19:46 — forked from oroce/nginx.conf
nginx config for using grafana, elasticsearch and graphite with authentication.
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
# This file should be placed on the directory of ~/blog/config
upstream unicorn {
server unix:/tmp/unicorn.todo.socket fail_timeout=0;
}
server {
listen 80 default;
#server_name example.com;
root /home/username/blog/public;
<?php
// identificação do servidor, usuário e senha.
$ldap_server = "ldap://nome ou ip do domain controler";
$auth_user = "domínio\usuário";
$auth_pass = "senha";
// identificação da base que será acessada.
$base_dn = "Ou=principal, dc=dominio, dc=com, dc=br";
// conexão com o servidor.
@douglasresende
douglasresende / wifi.sh
Last active August 29, 2015 13:57
Auto Connect Wifi Mac OS
#!/bin/bash
# http://magp.ie/2012/07/09/mac-osx-shell-script-to-automate-connecting-to-wifi-network/
AIRPORT="en1"; #may be en0, use networksetup -listallhardwareports to check
WIFI_NETWORK_NAME="nomedarede"
WIFI_PASSWORD="senhadarede"
SCRIPT_PATH="$(pwd)/wifi.sh"
if networksetup -getairportnetwork $AIRPORT | grep -i -a $WIFI_NETWORK_NAME ;
then
PROMPT_COMMAND='echo -ne "\033]0;"WIFI: OK"\007"'
@douglasresende
douglasresende / rede.php
Created September 11, 2012 02:31
rede.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Testando Servidores</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Douglas Resende Camargo">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
</head>
<body>