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 EmailProcessor | |
def self.process(email) | |
Post.create!({ body: email.body, email: email.from }) | |
end | |
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
class PostsController < ApplicationController | |
def index | |
@posts = Post.all | |
end | |
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
<h1>Posts</h1> | |
<% if @posts.count > 0 %> | |
<% @posts.each do |post| %> | |
<blockquote> | |
<p><%= post.body %></p> | |
<small><%= post.email %></small> | |
</blockquote> | |
<% end %> | |
<% else %> |
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
var arduino = require("johnny-five") | |
, board = new arduino.Board() | |
, photo = require('./photo') | |
, SendGrid = require('sendgrid').SendGrid | |
, sg = new SendGrid(process.env.SENDGRID_USER, process.env.SENDGRID_PASS); | |
board.on("ready", function() { | |
var button = new arduino.Button(3); | |
button.on("up", function() { |
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
- 1 UNO-328 | |
- 1 plaque de connexions sans soudure 840 trous | |
- 1 câble USB de 1 m (A mâle / B mâle) | |
- 1 boîte de straps de différentes longueurs | |
- 1 diode 1N4007 | |
- 1 barette mâle simple rangée sécable de 40 broches | |
- 1 micro buzzer 5V pour CI | |
- 3 Leds rouges 5mm | |
- 1 Led verte 5mm | |
- 1 Led jaune 5 mm |
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
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 26 2012 23:40:04) | |
MacOS X (unix) version | |
Included patches: 1-266 | |
Compiled by [email protected] | |
Huge version without GUI. Features included (+) or not (-): | |
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent | |
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff +digraphs | |
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path | |
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv |
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
$session = new Temboo_Session('ACCOUNT_NAME', 'APP_KEY_NAME', 'APP_KEY_VALUE'); | |
$listFolderContents = new Dropbox_ListFolderContents($session); | |
$inputs = $listFolderContents->newInputs(array('ResponseFormat' => 'json')); | |
$inputs->setCredential('Dropbox'); | |
$results = $listFolderContents->execute($inputs)->getResults(); |
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
it("should list all persons in response", function() { | |
var response = readFixtures("persons.json"); | |
var options = {}; | |
var view = new PersonsView({ | |
collection: new Persons() | |
}); | |
view.render(); | |
fakeResponse(response, options, function() { |
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
sendgrid.send(options, function(error, message) { | |
callback(error ? { error: message } : options) | |
}) |
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
var main = function () { | |
var ghresize = function (options) { | |
var ghwid = $("div#wrapper").width() | |
, extra = $("span.repo-label").width() * 2; | |
if(options && options.debug) { | |
console.log("Resizing"); | |
} |