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
| //Factory for pulling data (most likely json) using deffered method | |
| app.factory('items', function($http, $q){ | |
| return{ | |
| getItems: function(){ | |
| //Creating a deferred object | |
| var deferred = $q.defer(); | |
| //Calling Web API to fetch items | |
| $http({ |
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
| var myCall = function ( callback ) { | |
| $.ajax({ | |
| url: url, | |
| data: data, | |
| success: callback, | |
| dataType: dataType | |
| }); | |
| }; | |
| var myFunction = function( data ) { |
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
| //source: http://stackoverflow.com/questions/9133024/www-data-permissions | |
| //changes owner and group | |
| sudo chown -R yourname:www-data *folder* | |
| //adds s attribute which will keep new files and directories within *folder* having the same group permissions | |
| sudo chmod -R g+s cake *folder* |
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
| "use strict"; | |
| const request = require('request'); | |
| const crypto = require('crypto'); | |
| const publicKey = process.env["PUB_KEY"]; | |
| const privateKey = process.env["PRI_KEY"]; | |
| const url = "https://gateway.marvel.com/v1/public/"; |
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
| { | |
| "$connections": {...}, | |
| "definition": { | |
| "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
| "actions": { | |
| "Compose": { | |
| "inputs": "@body('List_all_RSS_feed_items')", | |
| "runAfter": { | |
| "List_all_RSS_feed_items": [ | |
| "Succeeded" |
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
| module.exports = function (context, req, rss) { | |
| if (rss) { | |
| context.res = { | |
| // status: 200, /* Defaults to 200 */ | |
| body: rss | |
| }; | |
| } | |
| else { | |
| context.res = { | |
| body: "Sorry, no medium post :(" |
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
| const placefeed = (data) => { | |
| const medium = document.getElementById('medium'); | |
| data.forEach(function(i) { | |
| let li = document.createElement('li'); | |
| li.innerHTML = `<h3><a target=_blank href="${i.primaryLink}>">${i.title}</a></h3><div class='text-muted'>${i.publishDate}</div>`; | |
| medium.appendChild( li ) | |
| }); | |
| } |
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
| module.exports = function (context, req) { | |
| req.query.tags = JSON.parse(req.query.tags) | |
| context.bindings.outputDocument = req.query | |
| context.done(); | |
| }; |
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
| var e = [ | |
| { skill: 'css', user: 'Bill' }, | |
| { skill: 'javascript', user: 'Chad' }, | |
| { skill: 'javascript', user: 'Bill' }, | |
| { skill: 'css', user: 'Sue' }, | |
| { skill: 'javascript', user: 'Sue' }, | |
| { skill: 'html', user: 'Sue' } | |
| ]; | |
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
| git config core.autocrlf true |
OlderNewer