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
| After porting beer_me to a mean.js app, I kept seeing "exports": e.g. "exports.foo = function() {console.log('hi');}" | |
| I assumed this had something to do with the way the functions were exposed elsewhere in a mean.js app's codebase. | |
| This assumption was fairly correct, and confirmed after reading: http://www.sitepoint.com/understanding-module-exports-exports-node-js/ | |
| I do not understand this line: https://github.com/cpww/beer_me/blob/master/app/controllers/users.server.controller.js#L11 | |
| Where does the ".extend" method come from? | |
| So the var "_" is assined the module.exports object from "lodash". | |
| Therefore "_.extend" is accessing the "extend" function from within the "lodash" module. |
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
| # 1) Make necessary modifications to a rails project such that an HTML response of "<h1>Hello World</h1>" | |
| # is returned when hitting the path "/hello_world/index" with a GET request | |
| # 2) Devise a shell utility "curl" command that makes a GET request of the path constructed in #1 | |
| # 3) Make necessary modifications to the rails project such that an HTML response of "<h1>Hello POST world</h1>" | |
| # is returned when hitting the path "/hello_world/index" with a POST request, do not remove any code created in #1 | |
| # 4) Devise a shell utility "curl" command that makes a POST request of the path constructed in #2 |
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
| // Problem: given an array of elements, create the array function to turn that array into | |
| // a string that will represent an html table containing the array elements, one element per row, | |
| // with each element appended with "foo" | |
| // E.g. The following array... | |
| var arr = ["hi", "bye", "todo", "fly"]; | |
| // ...becomes: | |
| // <html> | |
| // <body> | |
| // <table> |
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
| /* | |
| * The purpose of this excercise was to understand how to preserve a session | |
| * using only request-promise (https://www.npmjs.com/package/request-promise) | |
| * | |
| * USAGE: | |
| * | |
| * Grab dependencies: | |
| * $ npm --save request | |
| * $ npm --save request-promise | |
| * |
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
| // Ideally one would get user information from onEdit using onEdit's event's .user attribute, | |
| // however GAS does not give authorization to do so for the onEdit function (without some minor caveats). | |
| // The following subverts this slightly by allowing the user to include their own user information that is | |
| // then stored on the user's properties for the file/script. | |
| function onEdit(e) { | |
| var user = PropertiesService.getUserProperties().getProperty('user'); | |
| if (!user) { | |
| var ui = SpreadsheetApp.getUi(); | |
| while (!user) { |
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
| using System; | |
| using Xamarin.Forms; | |
| using System.Windows.Input; | |
| using System.Collections.Generic; | |
| using System.Runtime.CompilerServices; | |
| using System.ComponentModel; | |
| using System.Threading.Tasks; | |
| [assembly: | |
| InternalsVisibleTo ("TwinTechsLib.iOS"), |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am shiggiddie on github. | |
| * I am shiggiddie (https://keybase.io/shiggiddie) on keybase. | |
| * I have a public key ASAUMzmuLKaZLU7s-KvZ8pWfmMUxiTNkRaxNif-k-dkg0Ao | |
| To claim this, I am signing this object: |
OlderNewer