Skip to content

Instantly share code, notes, and snippets.

View jdefreites's full-sized avatar
🎯
Focusing

Jason De Freites jdefreites

🎯
Focusing
View GitHub Profile
@Gazzell
Gazzell / .eslintrc
Last active January 31, 2024 18:28
React, typescript, use craco to set custom tests paths and import aliases
{
"extends": [
"eslint-config-react-app"
],
"plugins": ["react", "import"],
"rules": {
"import/no-unresolved": "error"
},
"settings": {
"import/parsers": {
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 24, 2024 11:21
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@btroncone
btroncone / authentication.ts
Last active April 10, 2022 06:44
Angular 2 application role access decorator, wrapping built in CanAccess functionality. Prevents view transitions when user roles are not appropriate.
import { Injectable } from 'angular2/core';
import { Storage } from './storage';
import { CurrentUser } from '../interfaces/common';
@Injectable()
export class Authentication{
private _storageService : Storage;
private _userKey : string = "CURRENT_USER";
constructor(storageService : Storage){
@pkfrom
pkfrom / Sublime Text License Key.md
Last active January 3, 2024 03:25
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
@fzerorubigd
fzerorubigd / i3config
Created August 1, 2013 12:43
my i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@jpoehls
jpoehls / get_modelstate_errors.cs
Created March 28, 2012 20:30
Get dictionary of errors from ModelState in ASP.NET MVC
var errorList = ModelState
.Where(x => x.Value.Errors.Count > 0)
.ToDictionary(
kvp => kvp.Key,
kvp => kvp.Value.Errors.Select(e => e.ErrorMessage).ToArray()
);