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 DevelopersController < ApplicationController | |
respond_to :hal | |
FILTERS = { | |
:created_since => ->(p,d) {d.where(:created_at.gte => p.to_i)}, | |
:last_activity_since => ->(p,d) {d.with_last_activity_after(p)}, | |
:email_address => ->(p,d) {d.where(email_address: p)}, | |
:api_key => ->(p,d) {d.where(api_key: p)} | |
} | |
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
def get_message_infos_after_date(ymail_folder, last_date) | |
messages = [] | |
oldest_found = Time.now.to_i | |
last_date = last_date.to_i | |
offset = 0 | |
while oldest_found > last_date | |
hash = self.request('ListMessages', :fid => ymail_folder.fid, :sortKey => "date", :sortOrder => "down", | |
:startInfo => offset, :startMid => offset, :numInfo => 100, :numMid => 100) | |
found_messages = hash['result']['messageInfo'].map{|h| Ymail::YmailApi::DataTypes::MessageInfo.make_from_hash(h,ymail_folder)} | |
messages.push(*found_messages) |
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
set default_parallel 92; | |
read_rate_records = LOAD 's3://oib-mapreduce/output/folder_scan_rollups/2013/06/2013-02-15' AS ( | |
scanned_at:chararray, | |
received_at:chararray, | |
mm_id, | |
source:chararray, | |
folder:chararray, | |
read, | |
subject:chararray, |
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
set default_parallel 12; | |
sls_watchlist = LOAD 's3://oib-mapreduce-rmichael/sls_watchlist_dumps' AS ( | |
domain: chararray, | |
subject_line: chararray, | |
campaign_group: chararray, | |
mail_campaign_id: chararray, | |
hour: int | |
); |
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
context "current user exists, user is not currently using this application" do | |
# Redirects to Application > Email Addresses, prompts to activate application | |
end | |
context "current user exists, user is currently using this application" do | |
# Redirects to Application > (root) | |
end | |
context "no current user, EEA doesn't exist (8L)" do | |
# Redirects to account_to_found |
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
void set_color(int color, int redPin, int greenPin) | |
{ | |
int centrality = abs(128 - color); | |
int augmentation = floor((128 - centrality) / 5); | |
analogWrite(redPin, color+augmentation); | |
analogWrite(greenPin, 255-color+augmentation); | |
} |
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
#include <Arduino.h> | |
String resp; | |
void setup() { | |
Serial.begin(9600); | |
Serial.write("\r\n"); | |
Serial.println("-----------------------"); | |
Serial.println("Arduino Context.IO demo"); |
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
/* Handle content. */ | |
while (http.connected()) | |
{ | |
while (http.available() > 0) | |
{ | |
uint8_t byte = http.read(); | |
if (!success) | |
Serial.write(byte); |
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
# Option 1 | |
if eea_exists? | |
if eea_uses_something? | |
if eea_ever_used_application? | |
if eea_currently_uses_application? | |
recreate_eea; reactivate_application_for_eea; create_session; #13S | |
else | |
recreate_eea; reactivate_application_for_eea; create_session; #13S | |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
</head> | |
<body style="width: 100% !important; margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;"> | |
<table cellpadding="0" cellspacing="0" border="0" align="center"> | |
<tbody> | |
<tr> | |
<td valign="top"><h1 style="color: black !important;">Welcome to our AWESOME NEW WEB SERVICE!</h1></td> | |
</tr> |