Skip to content

Instantly share code, notes, and snippets.

View mauricionr's full-sized avatar
🏠
Working remotely

Mauricio mauricionr

🏠
Working remotely
View GitHub Profile
var https = require('https');
// https://www.yammer.com/api/v1/messages.json
var options = {
host: 'www.yammer.com',
path: '/api/v1/messages.json?access_token=YOUR-OAUTH2-TOKEN',
headers: { "Authorization": "Bearer YOUR-OAUTH2-TOKEN" }
}
var globalRequestId = 1;
@mauricionr
mauricionr / gist:c7e1a27be7975bab0bb7
Last active August 29, 2015 14:22
Messages Yammer JSON Structure
[ {
"id":"275815867",
"data":{
"data":{
"messages":[
{
"liked_by":{
"count":0,
"names":[]
},
(function () {
var OverridedContext = {};
var baseFn = function(originalContext,fieldHtmlInfo,fieldInfo,listDefaults){
debugger
}
/*
Header
Body
Footer
Group
@mauricionr
mauricionr / user-profile.js
Last active August 29, 2015 14:08
sharepoint user img
.directive('profile',function(){
return {
restrict:'EA',
replace:true,
template:'<div class="myimg data-ng-cloak">\
<img src="{{user.PictureUrl}}" alt="{{user.DisplayName}}"/>\
<label>Olá, {{user.DisplayName}}<label>\
</div>',
link:function(scope,element,attr){
scope.getMyProperties().then(function(data){scope.user = data})
//<div list-view group="null" target="Me" columns="['Title','Created','Modified']" show-edit="true" show-remove="true" show-new="true" end-point="/_api/web/lists/getbyTitle('Biblioteca de Estilos')/items" html="/SitePages/repeater.html"></div>
app.directive('listView',function(){
return {
restrict:'EA',
replace:true,
require:['?group','?columns','?target','?showRemove','?showEdit','?showNew','?endPoint','?html'],
controller:function($scope,$http,$q,$log,$window){
$scope.get = function(endPoint){
var defer = $q.defer()
$http.get(endPoint).success(function(data){defer.resolve(data)}).error(function(data){defer.reject(data)})
@mauricionr
mauricionr / gist:9f9aa3614d1e956f362c
Last active August 29, 2015 14:08
angular-calendar
angular.module('ngCalendar',[])
.directive('multconnectCalendar',function(){
return {
restrict:'AEC',
scope:{},
link:function(scope,elemen,attr){},
controller:function($scope,$sce,calendarService){
$scope.content = 'loading...'
$scope.prevMonth = function(){
if($scope.cal.month == 0){