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
<!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 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
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 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
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 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
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 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
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 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
^(.+)@(.+)$ | |
/.\@.*\../ | |
/\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 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
# -*- 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 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
# -*- coding: utf-8 -*- | |
import os | |
import yampy | |
import webbrowser | |
# Configure all of these constants at https://www.yammer.com/client_applications | |
CLIENT_ID = '' | |
CLIENT_SECRET = '' | |
REDIRECT_URI = 'http://brianlyttle.com/yammer/' |
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
// Add these to a form: | |
// * Web Browser | |
// * Button 1 (starts the process) | |
// * Button 2 (outputs the current URL) | |
// * TextBox 1 (logs actions) | |
// * TextBox 2 (for the token) | |
private void button1_Click(object sender, EventArgs e) | |
{ | |
webBrowser1.Navigate("https://www.yammer.com/dialog/oauth?client_id=SFZc9HHFXK77keEFYdXphw&redirect_uri=http://brianlyttle.com/yammer/mshtml/redirect_uri&response_type=token"); |
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
import os | |
import codecs | |
import xml.etree.ElementTree as etree | |
from dateutil import parser as du | |
from urlparse import urlparse | |
def parse_export(path): | |
"""Parses the WordPress export file into a Python-native format""" |