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
| { | |
| "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
| 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
| 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
| #!/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
| --- | |
| ### 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
| #!/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
| POST https://www.yammer.com/api/v1/activity.json HTTP/1.1 | |
| Authorization: Bearer REMOVED_TOKEN | |
| Content-Type: application/json; charset=utf-8 | |
| Host: www.yammer.com | |
| Content-Length: 405 | |
| Expect: 100-continue | |
| { | |
| "activity": { | |
| "actor": { |
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: application/json; charset=utf-8 | |
| Host: www.yammer.com | |
| Content-Length: 392 | |
| Expect: 100-continue | |
| Connection: Keep-Alive | |
| {"activity":{"actor":{"name":"Brian Lyttle","email":"[email protected]"},"action":"yammermvc:publish","object":{"url":"https://bing.com/?233334","description":"This is a cool image","video":{"width":1,"height":1},"type":"yammermvc:photo","title":"Cool image","image":"http://news.bbcimg.co.uk/media/images/68853000/jpg/_68853657_ac86edof.jpg"},"private":"false","message":"","users":null}} |
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 sys | |
| import csv | |
| import argparse | |
| import re | |
| import nltk | |
| from operator import itemgetter | |
| from string import punctuation | |
| def replace_topic(matched_topic): |