Skip to content

Instantly share code, notes, and snippets.

View codercampos's full-sized avatar
:octocat:
Working Hard!

Carlos Campos codercampos

:octocat:
Working Hard!
View GitHub Profile
@kidchenko
kidchenko / 201704121800_CreateAspNetCoreIdentity.cs
Created April 24, 2017 23:10
ASP .NET Identity Core + FluentMigrator
Create.Table("AspNetRoles")
.WithColumn("Id").AsString().PrimaryKey("PK_AspNetRoles").NotNullable()
.WithColumn("ConcurrencyStamp").AsString().Nullable()
.WithColumn("Name").AsString(256).NotNullable()
.WithColumn("NormalizedName").AsString(256).Nullable()
.Indexed("RoleNameIndex");
Create.Table("AspNetUserTokens")
.WithColumn("UserId").AsString().PrimaryKey("PK_AspNetUserTokens").NotNullable()
@y2k4life
y2k4life / app.html
Last active September 10, 2019 00:58
Aurelia Interger Range Validation Example in Documentatoin
<template>
<div>
<a href="http://aurelia.io/hub.html#/doc/article/aurelia/validation/latest/validation-basics/9" target="top">Documentation</a>
</div>
<form submit.delegate="submit()" novalidate autocomplete="off">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="volumeA">A) Integer Range Validation Example In Documentation</label>
<input type="text" class="form-control" id="volumeA" value.bind="volumeA & validate">
@lopspower
lopspower / README.md
Last active July 23, 2024 18:15
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@iest
iest / README.md
Last active August 11, 2022 09:20
Setting up environment variables with various shells

What the hell are environment variables?

They're just variables you set on your system that various programs/processes can read. A fairly standard example in javascript circles would be setting your NODE_ENV variable to "production" or "development", altering how node code is executed on your system (for example showing more debug messaging when in development).

With most shells there's a way to set them for the current session, and a way to set them for all sessions. The following is meant to be a guide on how to set env vars in the various shells.

Bash (The default shell on OSX)

Setting for the session:

@aloisdeniel
aloisdeniel / Animation Fade
Last active October 11, 2022 19:10
Xamarin.iOS view common animations
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null)
{
var minAlpha = (nfloat)0.0f;
var maxAlpha = (nfloat)1.0f;
view.Alpha = isIn ? minAlpha : maxAlpha;
view.Transform = CGAffineTransform.MakeIdentity ();
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut,
() => {
view.Alpha = isIn ? maxAlpha : minAlpha;
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@wm
wm / Powerline.md
Last active September 6, 2022 00:55
Installing powerline on Mac OSX. The following was done in version Version 10.8.2

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew

@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"