This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.styled-select { | |
margin: 0px 5px 0 0; | |
-webkit-border-radius: 4px; | |
background: white url("dropdown_arrow.png") no-repeat right; | |
border: 1px solid #c6c6c6; | |
border-radius: 4px; | |
overflow: hidden; | |
width: 230px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---: gem install foreman | |
---: gem install subcontractor (para usar projetos que dependem de gemsets diferentes!) | |
---: Criar o Procfile assim: | |
app1: subcontract --rvm <<versao ruby>>@<<app1> --chdir ./<<diretorio app1>> --signal INT -- bundle exec rails s | |
app2: subcontract --rvm <<versao ruby>>@<<app2> --chdir ./<<diretorio app2>> --signal INT -- bundle exec rackup | |
. | |
. | |
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ___ __ | |
" /'\_/`\ /\_ \ /\ \__ | |
" /\ \ ___\//\ \ ___\ \ ,_\ ___ __ __ | |
" \ \ \__\ \ / __`\\ \ \ / __`\ \ \/ / __`\/\ \/\ \ | |
" \ \ \_/\ \/\ \L\ \\_\ \_/\ \L\ \ \ \_/\ \L\ \ \ \_/ | | |
" \ \_\\ \_\ \____//\____\ \____/\ \__\ \____/\ \___/ | |
" \/_/ \/_/\/___/ \/____/\/___/ \/__/\/___/ \/__/ | |
" | |
" Burn, baby, burn! {{{ | |
" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Configurações do tab para que ele seja substituido por 2 espaços. | |
set expandtab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set tabstop=2 | |
"Configurações de exibição de número de linhas. | |
set ruler | |
set number | |
set numberwidth=3 | |
set cpoptions+=n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "./Subscriber" | |
require "./InheritanceSub" | |
require "./InheritanceSubB" | |
require"./ObserverRuby" | |
observer = ObserverRuby.new | |
sub1 = Subscriber.new | |
sub2 = Subscriber.new | |
sub3 = InheritanceSub.new | |
sub4 = InheritanceSubB.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LDR 0 | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int LDR_value = analogRead(LDR); | |
Serial.println(LDR_value); | |
delay(250); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "serialport" | |
@serial_port = SerialPort.new "/dev/tty.usbmodem1421" | |
def onOff() | |
21puts "Type something..: (on/ off / bye )" | |
command = gets.chomp | |
if command=="on" | |
puts "The LED is on..." | |
sleep 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial # you need to install the pySerial :pyserial.sourceforge.net | |
import time | |
# your Serial port should be different! | |
arduino = serial.Serial('/dev/tty.usbmodem1411', 9600) | |
def onOffFunction(): | |
command = raw_input("Type something..: (on/ off / bye )"); | |
if command =="on": | |
print "The LED is on..." | |
time.sleep(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Subscriber import * | |
class Observer: | |
subscribersList = [] | |
def subscribe(self,subscriber): | |
try: | |
if self.isAllowedSubscriber(subscriber): | |
if self.uniqueIdValidation(subscriber.id): | |
self.subscribersList.append(subscriber) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SimpleObserver(){ | |
var subscribersList=[]; | |
this.subscribe = function (_objectSub, _methodSub,_id){ | |
var subscriber = {} | |
subscriber.subObject=_objectSub; | |
subscriber.subMethod=_methodSub; | |
subscriber.subId = _id; | |
subscribersList.push(subscriber); | |
} |