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
//Reference: http://www.clearwater.com.au/code/provider | |
const randomMedicareNumber = ()=>{ | |
let sum = Math.floor(Math.random() * 5) +2; | |
const weights = [1, 3, 7, 9, 1, 3, 7, 9]; | |
let num = [sum] | |
for(let i = 0 ; i < 7 ; i++){ | |
let n = Math.floor(Math.random()*10) | |
sum += n * weights[i+1]; |
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
@mixin smooth-scrolling() { | |
overflow-y: scroll; /* has to be scroll, not auto */ | |
-webkit-overflow-scrolling: touch; | |
} | |
@include smooth-scrolling(); |
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
#!/bin/bash | |
set -eu | |
SENTRY_DOWNLOAD_Linux_i686="https://downloads.sentry-cdn.com/sentry-cli/1.44.1/sentry-cli-Linux-i686" | |
SENTRY_DOWNLOAD_Windows_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.44.1/sentry-cli-Windows-x86_64.exe" | |
SENTRY_DOWNLOAD_Darwin_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.44.1/sentry-cli-Darwin-x86_64" | |
SENTRY_DOWNLOAD_Linux_x86_64="https://downloads.sentry-cdn.com/sentry-cli/1.44.1/sentry-cli-Linux-x86_64" | |
SENTRY_DOWNLOAD_Windows_i686="https://downloads.sentry-cdn.com/sentry-cli/1.44.1/sentry-cli-Windows-i686.exe" | |
VERSION="1.44.1" | |
PLATFORM=`uname -s` |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'thousandsComma', | |
}) | |
export class ThousandsCommaPipe implements PipeTransform { | |
/** | |
* Takes a value and makes it '1000' or 1000 to '1,000'. | |
*/ | |
transform(value: any) { |
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 { Pipe, PipeTransform } from "@angular/core"; | |
import startCase from "lodash/startCase"; | |
@Pipe({ | |
name: "startCase" | |
}) | |
export class StartCasePipe implements PipeTransform { | |
/** | |
* Takes a string such as 'isCamelCase' and makes it 'Is Camel Case'. | |
*/ | |
transform(value: string) { |
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 { | |
InAppBrowser, | |
InAppBrowserOptions | |
} from "@ionic-native/in-app-browser"; | |
import { Platform } from "ionic-angular"; | |
@Injectable() | |
export class BrowserProvider { |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'currencyCustom' | |
}) | |
export class CurrencyCustom implements PipeTransform { | |
/** | |
* @param value | |
*/ |
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 inView = false; | |
function isScrolledIntoView(elementID) { | |
// This checks if the element is in view | |
var docViewTop = $(window).scrollTop(); | |
var docViewBottom = docViewTop + $(window).height(); | |
var elemTop = $(elementID).offset().top; | |
var elementBottom = elemTop + $(elementID).height(); |
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
app.filter('noFractionCurrency', | |
[ '$filter', '$locale', function(filter, locale) { | |
var currencyFilter = filter('currency'); | |
var formats = locale.NUMBER_FORMATS; | |
return function(amount, currencySymbol) { | |
var value = currencyFilter(amount, currencySymbol); | |
var sep = value.indexOf(formats.DECIMAL_SEP); | |
console.log(amount, value); | |
if(amount >= 0) { | |
return value.substring(0, sep); |
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
.form-group .help-block { | |
display: none; | |
} | |
.form-group.has-error .help-block { | |
display: block; | |
} |
NewerOlder