Skip to content

Instantly share code, notes, and snippets.

View genbliz's full-sized avatar

Christian Uzoh genbliz

View GitHub Profile
@genbliz
genbliz / mac-setup-redis.md
Created June 16, 2020 18:34 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@genbliz
genbliz / simple-efficient-debounce.js
Created January 25, 2019 13:13
Simple JavaScript Debounce
var debounceTimeoutHolder = {};
function debounceSimple(id, wait, cb) {
if (debounceTimeoutHolder[id]) {
clearTimeout(debounceTimeoutHolder[id]);
}
debounceTimeoutHolder[id] = setTimeout(function() {
cb();
}, wait);
}
@genbliz
genbliz / electron-open-external-link.js
Last active January 25, 2019 13:01
Electron: Open external a tag link in OS default browser.
@genbliz
genbliz / gist:5b135706005edc685c0d001c6ecc79c2
Created May 22, 2018 14:30 — forked from segebee/gist:7dde9de8e70a207e6e19
Nigeria States and Local Government Areas JSON - codingsavvy.com
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung
@genbliz
genbliz / auth-interceptor.service.js
Created October 28, 2015 12:50 — forked from jordanmkoncz/auth-interceptor.service.js
Avoid AngularJS circular dependency error when using $state in a HTTP interceptor
angular
.module('app')
.factory('AuthInterceptor', AuthInterceptor);
function AuthInterceptor($injector, $q) {
var $state;
var service = {
responseError: responseError
};
using Ninject.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Http;
using System.Web.Http.Dependencies;
// A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application.
@genbliz
genbliz / Paging.cs
Last active August 29, 2015 14:22 — forked from odytrice/Paging.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace System.Web.Mvc
{