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
# -*- coding: utf-8 -*- | |
ACCESS_TOKEN = '' | |
import json | |
import yampy | |
def pprint(raw_json): | |
print json.dumps(raw_json, sort_keys=True, | |
indent=2, separators=(',', ': ')) |
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
^(.+)@(.+)$ | |
/.\@.*\../ | |
/\A[^@]+@([^@\.]+\.)+[^@\.]+\z/ | |
/^(|(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6})$/i | |
\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Net; | |
using DotNetOpenAuth.AspNet.Clients; | |
using DotNetOpenAuth.Messaging; | |
using Newtonsoft.Json; | |
using YammerAuthentication.Yammer.Models.User; |
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 'net/http' | |
port = 443 | |
host = "www.yammer.com" | |
path = "/api/v1/users/[:id].json" | |
req = Net::HTTP::Put.new(path, initheader = { 'Authorization' => 'Bearer YOUR_ACCESS_TOKEN'}) | |
req.body = "work_telephone=01189998819991197253&work_extension=12345" | |
response = Net::HTTP.new(host, port).start {|http| http.request(req) } | |
puts response.code |
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
vagrant :: (master*) » ping www.yammer.com ~/vm/vagrant 127 ↵ | |
PING www.yammer.com (204.152.18.206): 56 data bytes | |
64 bytes from 204.152.18.206: icmp_seq=0 ttl=240 time=191.176 ms | |
64 bytes from 204.152.18.206: icmp_seq=1 ttl=240 time=191.060 ms | |
64 bytes from 204.152.18.206: icmp_seq=2 ttl=240 time=194.129 ms | |
64 bytes from 204.152.18.206: icmp_seq=3 ttl=240 time=201.785 ms | |
64 bytes from 204.152.18.206: icmp_seq=4 ttl=240 time=264.036 ms | |
64 bytes from 204.152.18.206: icmp_seq=5 ttl=240 time=216.519 ms | |
64 bytes from 204.152.18.206: icmp_seq=6 ttl=240 time=308.934 ms | |
64 bytes from 204.152.18.206: icmp_seq=7 ttl=240 time=339.555 ms |
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 exchange_check(exchange_user_email, exchange_password, yammer_user_email,ooo_message) | |
user_is_busy = false | |
user_is_ooo = false | |
user_is_ooo_startdate = DateTime.now.strftime("%D") # Date only | |
user_is_ooo_lastdate = DateTime.now.strftime("%D") # Date only | |
require 'net/http' | |
url = URI.parse('http://bl-hackday.cloudapp.net/hackday/calendar') |
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> | |
<html> | |
<head> | |
</head> | |
<body> | |
<script data-app-id="hyB2pTvrL36Y50py8EWj6A" src="https://assets.yammer.com/platform/yam.js"></script> | |
<script> | |
yam.connect.actionButton({ | |
container: "#embedded-like", | |
network: "provinggroundtestnetwork312.com", |
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> | |
<html> | |
<head> | |
<script data-app-id="YOUR APP ID" src="https://assets.yammer.com/platform/yam.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> | |
$(function() { | |
$('head').append('<meta property="og:title" content="Site Title" /> '); |
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
{ | |
"activity": { | |
"actor": { | |
"name": "Jim Martin", | |
"email": "jim@seyammer.com" | |
}, | |
"action": "yammermvc:publish", | |
"object": { | |
"url": "https://dox.com/file/abc123.pdf", | |
"description": "A set of charts showing the ROI of deploying Yammer over time.", |
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
POST https://www.yammer.com/api/v1/activity.json HTTP/1.1 | |
Authorization: Bearer REMOVED | |
Content-Type: text/plain; charset=utf-8 | |
Host: www.yammer.com | |
Content-Length: 494 | |
Expect: 100-continue | |
Connection: Keep-Alive | |
{"activity":{"actor":{"name":"Jim Martin","email":"jim@seyammer.com"},"action":"yammermvc:publish","object":{"url":"https://dox.com/file/abc123.pdf","description":"A set of charts showing the ROI of deploying Yammer over time.","video":{"width":1,"height":1},"type":"yammermvc:photo","title":"Yammer ROI.pdf","image":"https://dox.com/file/abc123.pdf"},"private":"false","message":"This is the updated version for the conference.","users":[{"name":"Brian Davis","email":"bdavis@seyammer.com"}]}} |