Skip to content

Instantly share code, notes, and snippets.

View anein's full-sized avatar
👨‍🚀
Focusing

Alexander N. anein

👨‍🚀
Focusing
View GitHub Profile
([\u26F9\u261D]|[\u270A-\u270D]|[\U0001F385\U0001F386]|[\U0001F3C2-\U0001F3C4\U0001F3C7\U0001F3CA-\U0001F3CB]|[\U0001f466-\U0001f469\U0001f46E]|[\U0001f470-\U0001f478\U0001f47C]|[\U0001f481-\U0001f483\U0001f485-\U0001f487]|[\U0001F442\U0001F443\U0001F446-\U0001F44F]|[\U0001F450]|[\U0001F4AA]|[\U0001f574\U0001f575\U0001f57A]|[\U0001F590\U0001F595\U0001F596]|[\U0001F645-\U0001F647\U0001F64B-\U0001F64F]|[\U0001F6A3]|[\U0001F6B4-\U0001F6B6]|[\U0001F6C0\U0001F6CC]|[\U0001F918-\U0001F91F]|[\U0001F926]|[\U0001F930-\U0001F939\U0001F93C-\U0001F93E]|[\U0001F9D1-\U0001F9DF])[\U0001F3FB-\U0001F3FF]?(?:(?:\u200d(?:[\u2640\u2642]|[\U0001F680\U0001F4BB\U0001F3A4\U0001F692\u2708\U0001F3A8\U0001F52C\U0001F4BC\U0001F3ED\u2695\U0001F393\U0001F3EB\u2696\U0001F33E\U0001F373\U0001F527])?)?)(?:\U0000FE0F)?
@anein
anein / angular2.router.ts
Last active February 2, 2021 15:54
Angular2 Router with the url matcher.
export function MyAwesomeMatcher ( url: UrlSegment[] ): UrlMatchResult {
if (url.length === 0) {
return null;
}
const reg = /^(awesome-path)$/;
const param = url[ 0 ].toString();
if (param.match( reg )) {
@anein
anein / IIFE.js
Created December 19, 2016 01:48
IIFE variations
// 1
( function IIFE(){/*...*/} )();
// 2
( function IIFE(){/*...*/}() );
// 3
( function(){/*...*/} )();
// 4
( function IIFE( global ){/*...*/} )( window );
// 5
( function IIFE( undefined ){
@anein
anein / angularjs.es6.filter.js
Created February 8, 2016 13:57
Creating an angularjs filter using ES6
class MyFilter {
static filter( value ){
return value.toLowerCase();
}
}
export default MyFilter.filter;