Skip to content

Instantly share code, notes, and snippets.

View joaofx's full-sized avatar
😁

Joao Carlos Clementoni joaofx

😁
View GitHub Profile
@kidchenko
kidchenko / 201704121800_CreateAspNetIdentity.cs
Created April 24, 2017 20:36
ASP .NET Identity + Fluent Migrator
[Migration(1)]
public class _201612091350_CreateAspNetIdentity : AutoReversingMigration
{
public override void Up()
{
Create.Table("AspNetRoles")
.WithColumn("Id").AsString().PrimaryKey("PK_AspNetRoles").NotNullable()
.WithColumn("ConcurrencyStamp").AsString().Nullable()
.WithColumn("Name").AsString(256).NotNullable()
.WithColumn("NormalizedName").AsString(256).Nullable()
@iamarcel
iamarcel / Creating Neat .NET Core Command Line Apps.md
Last active November 28, 2023 10:41
Creating Neat .NET Core Command Line Apps

Creating Neat .NET Core Command Line Apps

You can now read this on my (pretty) website! Check it out here.

Every reason to get more HackerPoints™ is a good one, so today we're going to write a neat command line app in .NET Core! The Common library has a really cool package Microsoft.Extensions.CommandlineUtils to help us parse command line arguments and structure our app, but sadly it's undocumented.

No more! In this guide, we'll explore the package and write a really neat

@vishcious
vishcious / build.fsx
Created May 6, 2015 15:08
FAKE build setup with external build properties file setup
#r "./FAKE/tools/FakeLib.dll"
#r "System.Xml"
#load "initializeProperties.fsx"
open InitializeProperties
open Fake
open System
open System.IO
open System.Configuration
open System.Xml
@davidfowl
davidfowl / dotnetlayout.md
Last active May 9, 2025 16:45
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@addyosmani
addyosmani / README.md
Last active May 10, 2025 11:24 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@ventaur
ventaur / Enumeration.cs
Created August 22, 2014 22:29
Small modifications to Headspring Enumeration and HTML conventions to support drop-downs for them
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using FubuCore.Util;
namespace My.Core.Domain.Models {
@cwigley
cwigley / dev.txt
Last active August 29, 2015 14:05
Developer Machine Build
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Disable-UAC
Enable-MicrosoftUpdate
cinst VisualStudio2013Ultimate -InstallArguments "/Features:'Blend LightSwitch VC_MFC_Libraries OfficeDeveloperTools SQL WebTools Win8SDK SilverLight_Developer_Kit WindowsPhone80'"
cinst VS2013.3
cinst 7zip
cinst autohotkey
cinst ccleaner
readonly ICollection<Action> _transactionCallbacks = new Collection<Action>();
public override int SaveChanges() {
int r;
try {
ExecuteDomainEvents();
r = base.SaveChanges();
} catch (Exception) {
_transactionCallbacks.Clear();
throw;
@tamoyal
tamoyal / gist:10441108
Created April 11, 2014 04:39
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile
@jbenet
jbenet / simple-git-branching-model.md
Last active May 3, 2025 18:07
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.