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
public T Post<T>(string path, IEnumerable<KeyValuePair<string, string>> parameters, FilePayload payload) | |
{ | |
using (var restClient = new RestClient()) | |
{ | |
using (var content = new MultipartFormDataContent()) | |
{ | |
content.Add(new FormUrlEncodedContent(parameters)); | |
var streamContent = new StreamContent(new MemoryStream(payload.ContentBytes)); | |
content.Add(streamContent, "attachment1", payload.FileName); |
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
<script type="text/javascript" | |
data-app-id="SPECIFY APP CLIENT ID HERE" | |
src="https://assets.yammer.com/assets/platform_js_sdk.js"></script> | |
<script> | |
yam.getLoginStatus({ token: 'SPECIFY A TOKEN ASSOCIATED WITH APP CLIENT ID' }, | |
function (response) { | |
if (response.authResponse) { | |
alert("logged in"); | |
console.dir(response); | |
} |
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
public class PostFile | |
{ | |
public T Post<T>(string path, string text, List<Attachment> attachments) | |
{ | |
using (var restClient = new RestClient()) | |
using (var content = new MultipartFormDataContent()) | |
{ | |
// Message part | |
var messageContent = new StringContent(text); |
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 Components | |
http://msdn.microsoft.com/en-us/library/ms532146.aspx | |
http://www.w3.org/TR/NOTE-HTMLComponents | |
Element behaviors | |
http://msdn.microsoft.com/en-us/library/ms531426(v=vs.85).aspx | |
Introduction to DHTML Behaviors | |
http://msdn.microsoft.com/en-us/library/ms531079(v=vs.85).aspx |
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
# Copyright (c) Microsoft Corporation | |
# All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
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
import sys | |
import time | |
import yampy | |
import webbrowser | |
def get_input(prompt): | |
if sys.hexversion > 0x03000000: | |
return input(prompt) | |
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
<script type="text/javascript"> | |
// This is to deal with IE and style leakages | |
// see: http://stackoverflow.com/a/10557782/22466 | |
(function () { | |
var head = document.getElementsByTagName('head')[0]; | |
var style = document.createElement('style'); | |
var completed = false; | |
style.type = 'text/css'; |
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.IO; | |
using System.Net; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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> | |
<title>setAuthToken() example</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script type="text/javascript" data-app-id="VlXilc0P6NemTfCzxTKChg" src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"></script> | |
</head> | |
<script type="text/javascript"> | |
$(document).ready(function () { |
OlderNewer