Skip to content

Instantly share code, notes, and snippets.

View jrgcubano's full-sized avatar

Jorge Rodríguez Galán jrgcubano

View GitHub Profile
export interface SortedArrayOpts {
filter?: Function;
compare?: Function | string;
unique?: boolean;
resume?: boolean;
}
export class SortedArray<T> extends Array<T> {
private readonly _filter: Function;
private readonly _compare: Function;
@jrgcubano
jrgcubano / AcceptanceTests.cs
Last active June 23, 2017 16:16
TDD resources for scmallorca Marvel KATA with HttpClient, Moq, Md5
using System;
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using RestSharp;
using Xunit;
namespace Todo.Web.AcceptanceTests
{
public static class Extensions
# Install script for Kristoffer
# Created 06.08.2015
ECHO Installing apps
ECHO Configure chocolatey
choco feature enable -n allowGlobalConfirmation
#choco install visualstudiocode
choco install notepadplusplus
{
"version": "0.2.0",
"configurations": [
{
"name": "StartCake",
"type": "mono",
"request": "launch",
"program": "${workspaceRoot}/tools/Cake/Cake.exe",
"runtimeArgs": [
"--debug",
@jrgcubano
jrgcubano / ComposeFuncExample.cs
Last active April 3, 2017 08:32
Functional C#examples using lang ext (compose functions, either, etc)
static readonly Func<Task<int>, Either<Exception, string>> GetMessage = queryAsync =>
string.Empty;
static readonly Func<string, Task<int>> QueryAsync = queryText =>
new SqlCommand(queryText).ExecuteNonQueryAsync();
static void Run()
{
var either = compose(QueryAsync, GetMessage)("update ...");
}
@jrgcubano
jrgcubano / Dockerfile
Created April 2, 2017 19:39
Angular2 Nginx by @cgcladera
FROM nginx
COPY dist/ /usr/share/nginx/html
COPY docker/entrypoint.sh /usr/local/bin
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
CMD ["entrypoint.sh", "-g", "daemon off;"]
alias open-my-project='cd "full/path/to/MySolutionFolder/" && start MySolution.sln /D .'
#example:
#alias open-mp='cd "C:/Users/max.nunes/Projects/myproject/" && start myproject.sln /D .'
@jrgcubano
jrgcubano / app.component.html
Last active March 24, 2017 19:08
ReactiveExtensions Angular 2 examples for http calls (cached, delay, recursive)
<h1>{{title}}</h1>
<div *ngFor="let user of usersA">
{{user.name.first}}
</div>
<button (click)="loadSubscriptionA()">Load A</button>
<button (click)="unloadSubscriptionA()">Unload A</button>
<div *ngFor="let user of usersB">
{{user.name.first}}
</div>
@jrgcubano
jrgcubano / ryan.boxstarter
Created March 15, 2017 11:47 — forked from RyannosaurusRex/ryan.boxstarter
Ryan's Dev Boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
cinst fiddler4
cisnt nodejs.install
cinst git-credential-winstore
cinst console-devel
cinst filezilla
cinst poshgit
cinst skype
@jrgcubano
jrgcubano / build.cake
Created March 15, 2017 11:43 — forked from RyannosaurusRex/ build.cake
Cake build watcher task. It includes a Windows 10 toast notification when the build completes.
#addin "nuget:?package=Cake.Watch" // Put this at the top to pull in the Cake.Watch package for use.
// Add this task in your build file somewhere. You can update which target to run, the file pattern to watch, and even the toast notification.
Task("Watch")
.Does(() => {
var settings = new WatchSettings {
Recursive = true,
Path = "./",
Pattern = "*.*"
};