Skip to content

Instantly share code, notes, and snippets.

View alejandrodazal's full-sized avatar

Alejandro Esteban Daza alejandrodazal

View GitHub Profile
// code here...
- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
// return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
NSURL *url = [request URL];
NSString *path = [url path];
// Intercept the external http requests and forward to Safari.app
// Otherwise forward to the PhoneGap WebView
angular.module('utils.filters', [])
.filter('wrapText', wrapText);
function wrapText($sce) {
return function (source, needle, wrap, strict) {
var regex;
if (typeof needle === 'string') {
regex = new RegExp(needle, "gi");
} else {
angular.module('utils.filters', [])
.filter('wrapText', wrapText);
function wrapText($sce) {
return function (source, needle, wrap, strict) {
var regex;
if (typeof needle === 'string') {
regex = new RegExp(needle, "gi");
} else {
angular.module('utils.filters', [])
.filter('removeAccents', removeAccents);
function removeAccents() {
return function (source) {
var accent = [
/[\300-\306]/g, /[\340-\346]/g, // A, a
/[\310-\313]/g, /[\350-\353]/g, // E, e
/[\314-\317]/g, /[\354-\357]/g, // I, i
/[\322-\330]/g, /[\362-\370]/g, // O, o
/* Times New Roman-based stack */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* Modern Georgia-based serif stack */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/* Traditional Garamond-based serif stack */
font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
/* Helvetica/Arial-based sans serif stack */
.gform_wrapper {
ul {
@extend .list-unstyled;
}
li {
@extend .form-group;
}
<?php
return array(
"AF" => "+93",
"AL" => "+355",
"DZ" => "+213",
"AS" => "+1",
"AD" => "+376",
"AO" => "+244",
"AI" => "+1",
/*
# Usage in html template:
"xxx | HTML2TXT"
<div ng-bind-html=" YourString | HTML2TXT "></div>
=======
/*
# Usage in html template:
"xxx | nl2br"
<div ng-bind-html=" YourString | nl2br "></div>
or: