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 * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf.mjs'; | |
import { PDFDocumentProxy } from 'pdfjs-dist'; | |
import { jsPDF } from "jspdf"; | |
pdfjsLib.GlobalWorkerOptions.workerSrc = '/assets/vendors/pdf.worker.mjs'; | |
const str = 'base64,' | |
export class PDFFool { |
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
// @flow | |
// https://twitter.com/jevakallio/status/941258932529614848 | |
import React, { Component, type Node } from 'react'; | |
import styled from 'styled-components/native'; | |
import Touchable from 'react-native-platform-touchable'; | |
import Carousel from 'react-native-snap-carousel'; | |
// $FlowFixMe | |
import { LinearGradient } from 'expo'; |
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
@Injectable() | |
export class RlBlockUiRequestInterceptor implements HttpInterceptor { | |
rlBlockUiService: RlBlockUiService; | |
// Use a forwardRef as the RlBlockUiService is defined/exported in the same file | |
constructor( @Inject(forwardRef(() => RlBlockUiService)) rlBlockUiService: RlBlockUiService){ | |
this.rlBlockUiService = rlBlockUiService; | |
} |
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
/** | |
* Created by ramor11 on 3/3/2017. | |
*/ | |
function distance_on_geoid(lat1, lon1, lat2, lon2) { | |
// Convert degrees to radians | |
lat1 = lat1 * Math.PI / 180.0; | |
lon1 = lon1 * Math.PI / 180.0; |
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
/* | |
* @ngdoc service | |
* @name $mdCompiler | |
* @module material.core | |
* @description | |
* The $mdCompiler service is an abstraction of angular's compiler, that allows the developer | |
* to easily compile an element with a templateUrl, controller, and locals. | |
* | |
* @usage | |
* <hljs lang="js"> |
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
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache | |
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Techniques in here adapted from all over, including: | |
# Kroc Camen: camendesign.com/.htaccess | |
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
# Sample .htaccess file of CMS MODx: modxcms.com |
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
(function() { | |
var formatters = { | |
'phone' : [/^\(?\s?(\d{3})\s?\)?\s?\-?\s?(\d{3})\s?\-?\s?(\d{4})$/, '($1) $2-$3' ], | |
'ssn' : [/^(\d{3})\s?\-?\s?(\d{2})\s?\-?\s?(\d{3})$/, '$1-$2-$3' ], | |
'creditcard' : [/^(\d{4})\s?\-?\s?(\d{4})\s?\-?\s?(\d{4})\s?\-?\s?(\d{4})$/, '$1-$2-$3-$4'] | |
}; | |
jQuery.fn.formatWith = function(regex, replacement) { | |
$(this).change(function() { | |
this.value = this.value.replace(regex, replacement); |
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
self.addEventListener('message', function (e) { | |
var data = e.data; | |
if (typeof (data) === "undefined") return; | |
switch (data.cmd) { | |
case 'start': |
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'; | |
/** | |
* # Application | |
* | |
* Core Application controller that includes functions used before we kickStart the Application | |
* The functions store within this files live outside of the ngView and are used as global function | |
*/ | |
angular.module('app').controller( | |
'webworkerController', [ | |
'$rootScope', |
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
Show hidden characters
{ | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AngularJS", | |
"AngularJS Snippets", | |
"Code Snippets Helper", | |
"CSS Format", |
NewerOlder