copied from iamsim
$ npm config set init.author.name "James Talmage"
$ npm config set init.author.email james@talmage.io
$ npm config set init.author.url http://iamsim.me/
$ npm config set init.license MIT
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="AngularJS"> | |
<template name="ngdcf" value="function compile(tElement, tAttrs, transclude) { $END$ return function (scope, element, attrs) { } }" description="A compile function" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> | |
<option name="JSP" value="false" /> | |
<option name="CSS_PROPERTY_VALUE" value="false" /> |
describe('myModule', function(){ | |
beforeEach(module('myModule')); | |
/* @ngInject */ | |
var a, b; | |
it('does things', function() { | |
// .... | |
}); | |
}); |
copied from iamsim
$ npm config set init.author.name "James Talmage"
$ npm config set init.author.email james@talmage.io
$ npm config set init.author.url http://iamsim.me/
$ npm config set init.license MIT
#!/usr/bin/env bash | |
GEN_PASS=$(dd if=/dev/urandom bs=1 count=9 2>/dev/null | base64 | rev | cut -b 2- | rev) | |
echo $GEN_PASS | |
echo $GEN_PASS | pbcopy | |
GEN_PASS=0 |
/pattern/flags
new Regexp(pattern[, flags])
flags: g
global, i
ignore case, m
multiline
regex.test(string)
or string.search(regex)
- returns true or false
regex.exec(string)
- null or an array. 0 index is matched string, 1+ is captures. Maintains state for continuation searches /g
flag is set.
root@42474955d2f4:~/temp# npm ls -g | |
/usr/local/lib | |
├─┬ generator-nm@1.4.0 | |
│ ├─┬ humanize-url@1.0.1 | |
│ │ └── strip-url-auth@1.0.1 | |
│ ├─┬ normalize-url@1.3.0 | |
│ │ ├── object-assign@3.0.0 | |
│ │ ├── prepend-http@1.0.1 | |
│ │ ├── query-string@2.3.0 | |
│ │ └─┬ sort-keys@1.1.0 |
Note: There is a lot of information here, but if I have provided a link, it is probably something you should click on and read. OAuth is a complex enough subject on it's own, and hacking these two services together only adds to it.
Even so, I have found Firebase's API to be simpler than almost any other OAuth solution I have explored. When all is said and done, the important bits of code related to authentication is actually less than 10 lines. If you have ever tried to implement your own OAuth flow before, you know how amazing that is.
In the end, it may be worth using Firebase for authentication, even if that's the ONLY thing you use it for.
npm search james.talmage | awk '{system("npm owner add jamestalmage "$1)}' |
Got Value: { DC: 'District of Columbia', DE: 'Delaware', FL: 'Florida', FM: 'Federated States of Micronesia', GA: 'Georgia', GU: 'Guam', HI: 'Hawaii', ID: 'Idaho', IL: 'Illinois', IN: 'Indiana'
https://www.firebase.com/blog/2015-10-07-how-to-keep-your-data-consistent.html
function fanoutPost({ uid, followersSnaphot, post, postId }) {
// Turn the hash of followers to an array of each id as the string
var followers = Object.keys(followersSnaphot.val());
var fanoutObj = {};
// write to each follower's timeline
// Correction: I think it needs something like this:
followers.forEach((key) => fanoutObj['/timeline/' + key + '/' + postId] = post);