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
#!/usr/bin/env python | |
# | |
# Converts any integer into a base [BASE] number. I have chosen 62 | |
# as it is meant to represent the integers using all the alphanumeric | |
# characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
# | |
# I plan on using this to shorten the representation of possibly long ids, | |
# a la url shortenters | |
# |
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
--- | |
### CONFIGURE REPOSITORIES ### | |
- name: install python-software-properties | |
action: apt name='python-software-properties' state=installed | |
- name: "add nginx ppa if ubuntu 10.04 and up" | |
action: apt_repository repo=ppa:nginx/stable | |
only_if: "$is_ubuntu and $is_10_up" |
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
#!/bin/bash | |
echo 'DEBIAN_FRONTEND="noninteractive"' >> /etc/profile |
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
function Yammer-HttpDelete([string]$target,[string]$token) { | |
try { | |
# Setup the request | |
$webRequest = [System.Net.WebRequest]::Create($target) | |
$webRequest.Method = "DELETE" | |
$webRequest.Headers.Add("Authorization", "Bearer $token"); | |
# Execute the request | |
[System.Net.WebResponse]$resp = $webRequest.GetResponse(); | |
$rs = $resp.GetResponseStream(); |
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
function Invoke-HttpDelete([string]$target, [string]$token) { | |
try { | |
# Setup the request | |
$webRequest = [System.Net.WebRequest]::Create($target) | |
$webRequest.Method = "DELETE" | |
$webRequest.Headers.Add("Authorization", "Bearer $token"); | |
# Execute the request | |
[System.Net.WebResponse]$resp = $webRequest.GetResponse(); | |
$rs = $resp.GetResponseStream(); |
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
{ | |
"actor_id": 1491478840, | |
"object_id": 352364218665986, | |
"action_id": 837943 | |
} |
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
{ | |
"activity": { | |
"actor": { | |
"name": "Brian Lyttle", | |
"email": "[email protected]" | |
}, | |
"action": "yammermvc:publish", | |
"object": { | |
"url": "http://localhost:33128/media/detail?id=33", | |
"description": "", |
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
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":"[email protected]"},"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":"[email protected]"}]}} |
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
{ | |
"activity": { | |
"actor": { | |
"name": "Jim Martin", | |
"email": "[email protected]" | |
}, | |
"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 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> | |
<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" /> '); |