Skip to content

Instantly share code, notes, and snippets.

View andresmoschini's full-sized avatar

Andres Moschini andresmoschini

  • Making Sense
  • Mar del Plata
View GitHub Profile
{
"$schema": "http://json-schema.org/draft-04/schema",
"id": "campaign-social-preferences.json",
"type": "object",
"properties": {
"shareButtons": {
"type": [ "array", "null" ],
"items": {
"type": "string",
"enum": [
@andresmoschini
andresmoschini / Maybe.cs
Last active August 29, 2015 14:26
Maybe Monad C# implementation
using System;
using System.Collections;
using System.Collections.Generic;
namespace Utilities
{
public static class Maybe
{
public static Maybe<T> From<T>(T value) => new Maybe<T>(value);
public static Maybe<T> None<T>() => default(Maybe<T>);
@andresmoschini
andresmoschini / git-bisect-applied.md
Last active September 6, 2019 13:54
Aplicando Git Bisect

Aplicando Git Bisect

Desde hace tiempo, cuando recién estaba investigando qué era Git, me llamo la atención el comando git bisect, pero siempre imaginé que sería dificil de aplicar y nunca se me ocurrió probarlo, hasta ahora.

El escenario

Trabajé en un feature branch, hice el Pull Request y recién luego (mal por mi) ejecuté los tests, que lamentablemente fallaron.

Los tests los corro con el siguiente comando:

@andresmoschini
andresmoschini / PullRequestsMergining.md
Last active August 29, 2015 14:21
Altenativas para mergear Pull Requests

Altenativas para mergear Pull Requests

Dueño del repositorio hace los merges

Pros

  • Control total sobre que se mergea.
  • El dueño del repo es el único responsable del código.

Cons

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
</head>
<body>
[class|="icon"] {
width:10px;
height:10px;
display:inline-block;
line-height:10px;
background-image: url("../img/icon_sprite.png");
background-repeat: no-repeat;
}
.icon-arrow-left{
@andresmoschini
andresmoschini / gist:6073066
Created July 24, 2013 18:17
Print last added lines to a file in the console
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading.Tasks;
namespace ConsoleApplication7
{
class Program

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

@andresmoschini
andresmoschini / Yammer.cs
Created November 21, 2012 17:34
Testing Gist & Yammer
public class Yammer
{
public string Name { get; set; }
}
@andresmoschini
andresmoschini / gitorious1.sh
Created September 26, 2012 17:44
gitorious1
apt-get install mc build-essential dkms openssh-server colordiff locate ntp pwgen rsync vim git git-core git-cvs git-doc git-svn apache2 apache2-threaded-dev apg aspell aspell-en build-essential geoip-bin imagemagick libapache2-mod-xsendfile libaspell-dev libcurl4-openssl-dev libdbd-mysql-ruby libexpat1-dev libgeoip-dev libgeoip1 libmagick++-dev libmagick++4 libmysql-ruby libmysqlclient-dev libonig-dev libpcre3 libpcre3-dev libreadline-dev libreadline5 libruby libsqlite3-dev libxslt1-dev libyaml-dev memcached mysql-client mysql-server openjdk-6-jre postfix ruby ruby-dev rubygems sphinxsearch sqlite3 unzip zip zlib1g zlib1g-dev