This file contains 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
/* | |
DigitalReadSerial | |
Reads a digital input on pin 2, prints the result to the serial monitor | |
This example code is in the public domain. | |
*/ | |
// digital pin 2 has a pushbutton attached to it. Give it a name: | |
int pushButton = 2; | |
// the setup routine runs once when you press reset: |
This file contains 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
Parsing recipes: 100% |#############################################################| Time: 00:00:55 | |
Parsing of 885 .bb files complete (0 cached, 885 parsed). 1227 targets, 44 skipped, 0 masked, 0 errors. | |
NOTE: Resolving any missing task queue dependencies | |
Build Configuration: | |
BB_VERSION = "1.20.0" | |
BUILD_SYS = "x86_64-linux" | |
NATIVELSBSTRING = "Ubuntu-12.04" | |
TARGET_SYS = "i586-poky-linux" | |
MACHINE = "clanton" |
This file contains 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 is a simple example of interacting with digital input of Intel Galileo board | |
# See http://arduino.cc/en/Tutorial/DigitalReadSerial | |
# and http://www.itsudo.com/galileo/2014/03/01/reading-digital-input-from-galileo-via-sysfs.html | |
import os | |
import time | |
button_gpio = 17 # maps to digital PIN5 on the board | |
# Export gpio port so we can interact with it |
This file contains 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
module Rack | |
# Redirects to correct domain | |
class RedirectToDomain | |
HOST = 'example.com' | |
def initialize(app) | |
@app = app | |
end | |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<meta content='text/html' http-equiv='Content-Type' /> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<title>Example</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript" src="util.js"></script> | |
<script type="text/javascript"> |
This file contains 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
<html> | |
<head> | |
<title>Test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
var field1 = $("input[name='field1']"); | |
var field2 = $("input[name='field2']"); | |
field2.attr('maxlength', field1.attr('maxlength')); | |
This file contains 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 File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
Bundler.require(:default, Rails.env) if defined?(Bundler) | |
module MyApp | |
class Application < Rails::Application | |
config.encoding = "utf-8" |
This file contains 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
class ShopRoutesConstraint | |
def self.matches?(request) | |
! ADMIN_DOMAIN_NAMES.include?(request.host) | |
end | |
end | |
class AdminRoutesConstraint | |
def self.matches?(request) | |
ADMIN_DOMAIN_NAMES.include?(request.host) | |
end |
OlderNewer