Skip to content

Instantly share code, notes, and snippets.

@goenning
goenning / promise-resolving.ts
Created February 23, 2016 18:52
sequential, parallel and pooled Promise resolving
import * as request from 'request'
import * as $ from 'cheerio'
let PromisePool = require("es6-promise-pool") //no typings definition
var sites = [
'http://www.microsoft.com',
'http://www.apple.com',
'http://stackoverflow.com',
'https://github.com'
]
public class Program
{
public static void Main(string[] args)
{
For(0, 10, (i) => {
Console.WriteLine(i);
});
//Parallel.For(0, 10, (i) => {
// Console.WriteLine(i);
@goenning
goenning / so-40421100.ts
Last active December 4, 2017 19:29
so-40421100
class Employee { firstname: string; lastname: string; }
let employee: Employee = JSON.parse(`{ "firstname": "Jon", "lastname": "Snow" }`);
console.log(employee);
using System;
namespace ConsoleApp5
{
public class Sorting
{
public string Name { get; }
private Sorting(string name)
{
@goenning
goenning / custom.css
Last active May 22, 2018 17:39
Custom CSS of demo.fider.io
a {
color: #ff9232;
}
.c-support-counter button.m-supported,
.c-support-counter button:hover {
color: #ff9232 !important;
}
.c-support-counter button.m-supported i.icon,
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: acme-corp
spec:
type: organization
children: [team-a]
---
apiVersion: backstage.io/v1alpha1
kind: Group
@goenning
goenning / ISO-3166-2.json
Created September 26, 2023 06:30
JSON with all ISO_3166-2 Region Code + Name
{
"IR-02": "Māzandarān",
"CY-02": "Limassol District",
"IR-28": "North Khorasan",
"IR-26": "Qazvin Province",
"IR-06": "Khuzestan",
"CY-04": "Ammochostos",
"IR-04": "West Azerbaijan Province",
"IR-05": "Kermanshah Province",
"IR-01": "Gilan Province",