Skip to content

Instantly share code, notes, and snippets.

View jeanfbrito's full-sized avatar
🌱
Seeding the future!

Jean Brito jeanfbrito

🌱
Seeding the future!
View GitHub Profile
@jeanfbrito
jeanfbrito / gist:3986158
Created October 31, 2012 09:51
Clean Install – Mountain Lion OS X 10.8 DP3
@jeanfbrito
jeanfbrito / server.md
Last active September 30, 2018 18:18 — forked from josemarluedke/server.md
Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano

Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano

Update the system

sudo apt-get update

Install some dependencies

load 'deploy'
load 'deploy/assets' # Assets pipeline for Rails application
load 'config/deploy'

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@jeanfbrito
jeanfbrito / lm35-to-thingspeak.lua
Created October 12, 2015 20:59 — forked from rock3m/lm35-to-thingspeak.lua
Detecting the indoor temperature using LM35, and send the periodic recordings to ThingSpeak via WiFi. See project details at https://medium.com/grace-learns-iot/day-7-monitoring-home-temperature-on-the-internet-26c175ee7200
--- Config
SSID = "YOUR_WIFI_NAME"
PASSWORD = "YOUR_WIFI_PASSWORD"
TIMEOUT = 30000000 -- 30s
--- Station modes
STAMODE = {
STATION_IDLE = 0,
STATION_CONNECTING = 1,
STATION_WRONG_PASSWORD = 2,
@jeanfbrito
jeanfbrito / README.md
Created August 21, 2016 04:22 — forked from foosel/README.md
First experiments with NodeMCU to publish the current settings of my adjustable height working desk to MQTT

First experiments with NodeMCU to publish the current settings of my adjustable height working desk to MQTT.

NodeMCU can be found here: https://github.com/nodemcu/nodemcu-firmware

Note that you'll need a current version with support for floats (which the ultrasonic sensor library utilizes), I'm using 0.9.5 2015-03-18 with float support myself.

Support for the HC-SR04 sensor in NodeMCU can be found here: https://github.com/sza2/node_hcsr04

I provided my slightly adjusted version which makes measuring a non-blocking afair, allowing for callbacks when the measurement completes.

@jeanfbrito
jeanfbrito / restAPI.markdown
Created October 31, 2016 15:54 — forked from iksose/restAPI.markdown
Creating a REST API using Node.js, Express, and MongoDB

###Creating a REST API using Node.js, Express, and MongoDB

####Installing Node.js

Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.

Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.

@jeanfbrito
jeanfbrito / 00.howto_install_phantomjs.md
Created December 18, 2016 23:30 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@jeanfbrito
jeanfbrito / SmoothFollow.cs
Created May 24, 2017 18:09 — forked from Hamcha/SmoothFollow.cs
Stupid Unity scripts : "Smooth Follow" from Standard Assets
// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin