Skip to content

Instantly share code, notes, and snippets.

View monkeymonk's full-sized avatar
😶
β+∂(ℤ²-i)ℕ×g³=α!

Stéphan Zych monkeymonk

😶
β+∂(ℤ²-i)ℕ×g³=α!
View GitHub Profile

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
/*
# Usage in html template:
"xxx | nl2br"
<div ng-bind-html=" YourString | nl2br "></div>
or:
/*
# Usage in html template:
"xxx | HTML2TXT"
<div ng-bind-html=" YourString | HTML2TXT "></div>
=======
@monkeymonk
monkeymonk / gist:54bf2f1fd8ffe73c2ce0
Last active May 24, 2020 17:39
dial_countries.php #resources
<?php
return array(
"AF" => "+93",
"AL" => "+355",
"DZ" => "+213",
"AS" => "+1",
"AD" => "+376",
"AO" => "+244",
"AI" => "+1",
.gform_wrapper {
ul {
@extend .list-unstyled;
}
li {
@extend .form-group;
}
/* 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 */
@monkeymonk
monkeymonk / remove-accents.js
Created October 1, 2014 08:51
AngularJS `removeAccents` filter
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
@monkeymonk
monkeymonk / wrap-text.js
Last active August 29, 2015 14:07
AngularJS `wrapText` filter
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 {
@monkeymonk
monkeymonk / pubsubService
Last active August 29, 2015 14:09
AngularJS simple PubSub service
'use strict';
(function() {
var mod = angular.module("App.services", []);
//register other services here...
/* pubsub - based on https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js*/
mod.factory('pubsub', function() {
var cache = {};
[
{
".123":"application\/vnd.lotus-1-2-3"
},
{
".3dml":"text\/vnd.in3d.3dml"
},
{
".3g2":"video\/3gpp2"
},