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
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266HTTPClient.h> | |
const char* ssid = "vinirodr"; | |
const char* password = "qwertyui"; | |
IPAddress server(162,243,2,159); | |
const int httpPort = 80; |
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
// Include Light Sensor library | |
#include "light.h" | |
int sensorPin; | |
void setup() { | |
// Set sensor pin | |
sensorPin = 0; | |
} |
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
//this outputs pot value to screen in ohms | |
int gasSensor = 0; // select input pin for gasSensor | |
int val = 0; // variable to store the value coming from the sensor | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { |
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
// Include header file | |
#include "pomodoro.h" | |
#include "Arduino.h" | |
Pomodoro::Pomodoro(int level) { | |
if (level == 0) { | |
for (int i = 2; i < 7; i++) { | |
// digitalWrite(i, LOW); | |
} |
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
#!/bin/sh | |
echo -n "Forneça o nome do arquivo a ser verificado: " | |
read arq | |
positive_answer(){ | |
echo "\033[33;32mSim\033[0m" | |
} | |
negative_answer(){ |
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
Pry.config.editor = "subl" | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "" | |
prompt << "#{Rails.version}@" if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})> " | |
end | |
Pry.config.exception_handler = proc do |output, exception, _| |
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
export PS1='`[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "\[\e[31m\]" || echo "\[\e[32m\]"`$(__git_ps1 "(%s)\[\e[00m\]")\[\e[01;34m\]\w\[\e[00m\] \$ ' |
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
# ruby 1.9 - Argumentos Ordenados | |
def params_1_9(name, age) | |
name = args[:name] | |
age = args[:age] | |
puts name | |
puts age | |
end | |
# ruby 2.0 - Argumentos Nomeados |
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
# Apt | |
alias apti='sudo apt-get install' | |
alias apts='sudo apt-cache search' | |
alias aptp='sudo apt-get --purge remove' | |
alias aptr='sudo apt-get remove' | |
# Rails | |
alias rdbd='rake db:drop' | |
alias rdbc='rake db:create' | |
alias rdbm='rake db:migrate' |