Skip to content

Instantly share code, notes, and snippets.


Meligy Meligy

View GitHub Profile
Meligy /
Created July 24, 2016 15:00
Using jQuery with Angular 2 CLI Webpack Version – With No TypeScript Conflict

I wrote a post yesterday that talked about: [Using Webpack with Angular CLI directly from official Github source][post] [post]:

The post seemed to get a bit of traction on twitter, and among other feedback, I got an interesting question in a direct message:

Hi Meligy, Have you tried importing jQuery in Angular-CLI webpack branch project anytime??

Well, turns out I didn't. I expected it to be just a require(...) / import ... line away. With Webpack, you often don't need much more than that.

Meligy /
Last active August 29, 2015 14:12 — forked from zenorocha/.hyper.js

Setup Mac OS X

I'm in a hospital in Spain and my MacBook was stolen.

Hospital Commit

Now I bought a new one and need to configure it. I have an external hard drive that backup everything using Time Machine, but I don't want all the crap I had in the old one.

1. Run Software Update

Meligy /
Last active December 21, 2015 23:49
This is where your pinned taskbar icons live. Helpful for creating icons with shortcuts Via

Batch file or simply pasting in start menu/screen:

%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar


"$env:USERPROFILE\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"

View add-isapi-filter.ps1
if((Get-WebConfiguration -Filter /system.webServer/isapiFilters/filter |
Where-Object -Property path -EQ $isapiDllPath) `
-eq $null) {
Add-WebConfiguration -Filter /system.webServer/isapiFilters `
-Value @{
name = $isapiName;
path = $isapiDllPath;
preCondition = $preConditionIfAny
} `
Meligy / app-default-button.js
Last active December 16, 2015 08:28
Sample directive to set default button click using Angular JS in ASP.NET webforms app
View app-default-button.js
var app = angular.module("app", []);
app = app.directive('appDefaultButton', function () {
return function (scope, element, attr, ctrl) {
// This is all standard directive code copied from ng-sanitize
// The point of it is store & track
// if passed value was changed & re-run
Meligy / SetConverter.cs
Created May 10, 2011 12:38
A simple way to resolve ISet<> interface from JSon string as HashSet<> object
View SetConverter.cs
namespace SampleJson
using Newtonsoft.Json.Converters;
using System.Collections.Generic;
internal class SetConverter<T> : CustomCreationConverter<ISet<T>>
public override ISet<T> Create(Type objectType)
return new HashSet<T>();
Meligy / Newtonsoft_Json_Sample.cs
Created May 10, 2011 06:14
Seeing what capabilities JSON.NET has in working with slightly complex structures
View Newtonsoft_Json_Sample.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
namespace SampleJson
class Program
Meligy / random
Created March 19, 2011 15:18
How to eager load Child Collections (Ex: Blog.Post.Comments) Directly Using QueryOver In NHibernate 3.1
View random
.Fetch(b => b.Posts).Eager // If you don't add this, the following will not work
.Fetch(b => b.Posts.First().Comments).Eager // The trick here is using ".First()" after the collection