Skip to content

Instantly share code, notes, and snippets.

View Meligy's full-sized avatar

Meligy Meligy

View GitHub Profile
@parsalotfy
parsalotfy / launch.json
Created November 29, 2018 17:14
VSCode launch configuration for building and testing csharp code by pressing F5
{
"version": "0.2.0",
"configurations": [
// Create a dotnet core class library named 'mylib' with pressing F5
{
"name": "Create_mylib",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
@biggyspender
biggyspender / MobyLinux.ps1
Last active September 28, 2020 23:36
Set DockerNAT switch to be a private network
# See comment lines prefixed with ADDED
# It might be necessary to delete the existing DockerNAT switch in hyper-v manager
<#
.SYNOPSIS
Manages a MobyLinux VM to run Linux Docker on Hyper-V
.DESCRIPTION
Creates/Destroys/Starts/Stops A MobyLinux VM to run Docker on Hyper-V
.PARAMETER VmName
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 29, 2024 09:32
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@staltz
staltz / introrx.md
Last active May 2, 2024 11:19
The introduction to Reactive Programming you've been missing
@addyosmani
addyosmani / LICENSE.txt
Last active April 8, 2024 20:15 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@ducas
ducas / MongoApiController.cs
Created April 10, 2014 23:53
Generic WebAPI controller to provide a REST interface for MongoDB collections
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using MongoDB.Bson;
using MongoDB.Driver;
using MongoDB.Driver.Builders;
namespace Web.Core
{
public abstract class MongoApiController<T> : ApiController
@pntrivedy
pntrivedy / Get query string using fastest javascript method
Created March 12, 2014 00:21
I was searching for a way in javascript by which I can get url query parameters and found this here : http://jsperf.com/querystring-with-javascript probably the best solution.
<script>
window.getParameterByName = function(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if (results == null) return "";
else return decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
@sindresorhus
sindresorhus / names.txt
Created February 19, 2014 13:21
1000 awesome random project/release names for your pleasure
chats-conditionate
isomerizing-louma
tipcat-preorder
incipient-mumpishly
xylorimbas-drosophilas
disloyalties-modulates
scoreboards-preselections
tiptop-stummel
also-subovate
stimy-cathodically