Skip to content

Instantly share code, notes, and snippets.

View tolemac's full-sized avatar

Javier Ros tolemac

View GitHub Profile
@tolemac
tolemac / lobFocusManagerExtensions.ts
Last active August 29, 2015 14:26
To do work angular-focus-manager with md-autocomplete (from Angular Material)
module LoB.Directives {
window.LoBModule.directive("lobAutocompleteAutofocus", ["focusManager", "focusQuery", (focusManager, focusQuery) => {
var focusEls = [];
var focusElsCount = 0;
var unwatchChanges: Function;
var timer: number;
function reset() {
unwatchChanges = null;
focusElsCount = 0;
@tolemac
tolemac / StructureMapAOP.cs
Last active May 11, 2020 20:11
AOP using StructureMap + Castle.DynamicProxy
using System;
using System.Collections.Generic;
using StructureMap;
using StructureMap.Building.Interception;
using StructureMap.Pipeline;
namespace AOPStructureMap
{
public interface IAppService
{
@tolemac
tolemac / GridComponent.ts
Created February 7, 2017 17:32
Angular 2 Visual Inheritance
import {Component} from '@angular/core';
function GridComponent(obj: any) {
let templateMetadata = {
template: `blablablab
<table>
<thead>
<tr>${obj.headerTemplate}</tr>
</thead>
<tbody>
@tolemac
tolemac / install.sh
Last active January 18, 2018 13:34 — forked from ikennaokpala/install.sh
install nginx with ngx_lua automatically under debian/ubuntu like system
#!/bin/bash
set -e
NGX_VER="1.12.2"
NDK_VER="0.3.0"
NGX_LUA_VER="0.10.11"
LUAJIT_VER="2.0.5"
LUAROCKS_VER="2.4.3"
WORKDIR=$(pwd)
NGX_INSTALL_DIR="/etc/nginx"
if ! [ -e "nginx-${NGX_VER}.tar.gz" ]; then