Skip to content

Instantly share code, notes, and snippets.

View kikoanis's full-sized avatar
🏠
Working from home

Ali Hmer kikoanis

🏠
Working from home
View GitHub Profile
@kikoanis
kikoanis / 2019-https-localhost.md
Created December 14, 2022 22:08 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@kikoanis
kikoanis / cloudSettings
Created March 15, 2022 16:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-15T16:15:45.787Z","extensionVersion":"v3.4.3"}
@kikoanis
kikoanis / array_iteration_thoughts.md
Created September 11, 2017 14:30 — forked from ljharb/array_iteration_thoughts.md
Array iteration methods summarized

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

@kikoanis
kikoanis / MvcMockHelpers.cs
Created October 25, 2012 22:11 — forked from rally25rs/MvcMockHelpers.cs
MvcMockHelpers.cs - Helper Utility for Mocking MVC3 Controllers with Moq.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Moq;
/// <summary>
/// This helper class can be used to set up Moq mocks of MVC3/4 controllers.