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:ca78979709c75de9e347
Created May 14, 2014 05:20
Setting up a Digital Ocean Droplet (VPS) on Ubuntu with Rails, Nginx, Unicorn, Postgres, Redis and Capistrano
http://www.andrewgertig.com/2013/11/setting-up-a-digital-ocean-droplet-vps-on-ubuntu-with-rails-nginx-unicorn-postgres-redis-and-capistrano
Setting up a Digital Ocean Droplet (VPS) on Ubuntu with Rails, Nginx, Unicorn, Postgres, Redis and Capistrano
November 16, 2013
Create a Droplet on Digital Ocean
I stuck with the defaults:
Size
512MB / 1 CPU
20GB SSD
@jeanfbrito
jeanfbrito / gist:3986158
Created October 31, 2012 09:51
Clean Install – Mountain Lion OS X 10.8 DP3
@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 / Symlinks for me
Created October 18, 2015 06:57
Symlinks for my personal use
@jeanfbrito
jeanfbrito / Vagrantfile
Last active November 9, 2015 17:46
Vagrantfile for Windows
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hellobits"
config.vm.box_url = "file:///d:/vagrant/hellobits-trusty64-virtualbox.box"
config.vm.network :forwarded_port, guest: 3000, host: 3000
end
VAGRANTFILE_API_VERSION = "2"
@jeanfbrito
jeanfbrito / init.lua
Last active November 30, 2015 16:35
NodeMCU DHT22 test
pin = 4
status,temp,humi,temp_decimial,humi_decimial = dht.read(pin)
if( status == dht.OK ) then
-- Integer firmware using this example
print(
string.format(
"DHT Temperature:%d.%03d;Humidity:%d.%03d\r\n",
math.floor(temp),
temp_decimial,
math.floor(humi),
@jeanfbrito
jeanfbrito / init.lua
Created November 30, 2015 18:44
Sensor da Estufa V0.1
--- Config
SSID = "Dark side of the Force"
PASSWORD = "senhasupersecreta"
TIMEOUT = 30000000 -- 30s
--- Station modes
STAMODE = {
STATION_IDLE = 0,
STATION_CONNECTING = 1,
STATION_WRONG_PASSWORD = 2,
class Task < ActiveRecord::Base
extend Enumerize
has_ancestry
attr_accessible :title, :description, :parent_id, :project_id
enumerize :status, in: [:created, :working, :waiting, :paused, :stopped, :finished]
belongs_to :project
class Task < ActiveRecord::Base
extend Enumerize
has_ancestry
attr_accessible :title, :description, :parent_id, :project_id, :status
enumerize :status, in: {
:created => 0,
:working => 1,
Tasker.Projects = {} if Tasker.Projects is undefined
Tasker.Projects.Show = ->
$('.new-task-button').click ->
url = $(this).data('url')
$.ajax
url: url
type: "GET"
success: (data)->
$('#newTask .modal-body').html(data)