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
[ | |
{ | |
"category": "#love", | |
"tags": [ | |
"Love", | |
"InstaLove", | |
"MyLove", | |
"Lovers", | |
"LoveLife", | |
"LoveStory", |
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
final String prefix = "#"; | |
InputFilter hashWatcher = new InputFilter() { | |
@Override | |
public CharSequence filter(final CharSequence source, final int start, | |
final int end, final Spanned dest, final int dstart, final int dend) { | |
final int newStart = Math.max(prefix.length(), dstart); | |
final int newEnd = Math.max(prefix.length(), dend); | |
if (newStart != dstart || newEnd != dend) { | |
final SpannableStringBuilder builder = new SpannableStringBuilder(dest); | |
builder.replace(newStart, newEnd, source); |
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
{ | |
"#000000": "Black", | |
"#000080": "Navy Blue", | |
"#0000C8": "Dark Blue", | |
"#0000FF": "Blue", | |
"#000741": "Stratos", | |
"#001B1C": "Swamp", | |
"#002387": "Resolution Blue", | |
"#002900": "Deep Fir", | |
"#002E20": "Burnham", |
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
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
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
def versionMajor = 1 | |
def versionMinor = 1 | |
def versionPatch = 2 | |
def versionNameSuffix = ".debug" | |
android { | |
defaultConfig { | |
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch | |
versionName "${versionMajor}.${versionMinor}.${versionPatch}" | |
resValue "string", "app_version", |
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 { Component, OnInit, OnDestroy } from '@angular/core'; | |
import {Http} from "@angular/http"; | |
import { LocalCacheService } from "./local-cache.service"; | |
@Component({ | |
selector: 'app-example', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class ExampleComponent implements OnInit, OnDestroy { |
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 MultiGetSet = function(opt){ | |
var getType = function(o) { | |
return ({}).toString.call(o).match(/\s([a-zA-Z]+)/)[1].toLowerCase() | |
}; | |
if(!opt.public || !opt.private) | |
return opt.public; | |
if(opt.handler && opt.handler.init) |
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 { Injectable } from "@angular/core"; | |
import { ReplaySubject, Observable } from "rxjs/Rx"; | |
interface Message { | |
channel: string; | |
data: any; | |
} | |
@Injectable() | |
export class MessageBus { |
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
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
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 { TestBed, async, inject } from '@angular/core/testing'; | |
import { HttpClientModule, HttpRequest, HttpParams } from '@angular/common/http'; | |
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; | |
import { HttpClientFeatureService } from './http-client-feature.service'; | |
describe(`HttpClientFeatureService`, () => { | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [ |