Skip to content

Instantly share code, notes, and snippets.

View diegobfernandez's full-sized avatar

Diego B. Fernandez diegobfernandez

View GitHub Profile
@diegobfernandez
diegobfernandez / app.css
Created November 21, 2012 21:40
IndexedDB
body {
color: #222;
font: 14px Arial;
}
body a {
color: #3D5C9D;
text-decoration: none;
}
@diegobfernandez
diegobfernandez / EntityFrameworkRepositorio.cs
Last active July 19, 2020 21:38
Exemplo de serviço com "repository" e "dependency injection"
using System;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using WebService.Persistencia.Exceptions;
namespace WebService.Persistencia {
// Implementação de IRepositorio utilizando a biblioteca Entity Framework
public abstract class EntityFrameworkRepositorio<T> : IRepositorio<T> where T : class {
protected DbContext db;
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Create a build and development environment for Firefox.
FROM ubuntu:13.10
@diegobfernandez
diegobfernandez / install.sh
Last active August 29, 2015 14:20
Install NuGet on Mono
#!/bin/bash
# Tested on Mono 3.12.1
USER_HOME=~
NUGET_DIR=$USER_HOME/.nuget
NUGET_EXE_URL="https://nuget.org/nuget.exe"
NUGET_EXE_NAME=nuget.exe
NUGET_EXE_PATH=$NUGET_DIR/$NUGET_EXE_NAME
@diegobfernandez
diegobfernandez / por-artista.md
Last active August 29, 2015 14:20
Violão Clássico

Francisco Tarrega

La Paloma

Gran Vals

Capricho Arabe

Dilermando Reis

@diegobfernandez
diegobfernandez / install-editorconfig-core-net.sh
Last active August 29, 2015 14:24
Install editorconfig-core-net on Linux
#!/bin/sh
REPOSITORY=https://github.com/editorconfig/editorconfig-core-net.git
INSTALL_DIR=~/.editorconfig-core-net
REPOSITORY_DIR=$INSTALL_DIR/repository
APPLICATION_SRC_DIR=$REPOSITORY_DIR/src/EditorConfig.App
BUILD_CONFIGURATION=Release
echo "Cleaning up old versions with they exists"
rm -rf $INSTALL_DIR
@diegobfernandez
diegobfernandez / expandable-image.css
Last active August 29, 2015 14:24
An easy way to expand images on a page
.expandable-image-container {
position: fixed;
top: 0;
right: 0;
height: 100%;
width: 100%;
background: rgba(25, 25, 25, 0.7);
}
.expandable-image-container img {
@diegobfernandez
diegobfernandez / Dapper.fs
Last active May 9, 2017 05:45 — forked from vbfox/Dapper.fs
Minimal dapper in F#
module DapperFSharp
open System.Data
open System.Dynamic
open System.Collections.Generic
open Dapper
let dapperQuery<'Result> (query:string) (connection: IDbConnection) : 'Result seq =
connection.Query<'Result>(query)