Skip to content

Instantly share code, notes, and snippets.

View cnjimbo's full-sized avatar
💭
I may be slow to respond.

Jimbo Tang cnjimbo

💭
I may be slow to respond.
View GitHub Profile
@cnjimbo
cnjimbo / TypeMemberLayout.xaml
Created February 16, 2022 07:21 — forked from sliekens/TypeMemberLayout.xaml
StyleCop Type Member Layout for Resharper 9
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="COM interfaces" Priority="2000">
<TypePattern.Match>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>
@cnjimbo
cnjimbo / webpack.config.js
Created April 20, 2021 07:04 — forked from xpepermint/webpack.config.js
Webpack Common Configuration File (ReactJS)
'use strict';
/**
* Webpack Configuration File
*
* This is a configuration file for Webpack module bundler. You should customize
* it to fit your project.
*
* To start the development server run:
*
@cnjimbo
cnjimbo / LinearRegression.js
Created April 13, 2017 07:29 — forked from jonahwilliams/LinearRegression.js
Under-fitting versus Over-fitting
function LinearRegression(data){
var X = [],
y = [];
for (var i = 0; i < data.length; i ++){
var tempX = [];
for(var j = 0; j < data[0]['x'].length; j++){
tempX.push(data[i]['x'][j]);
}
X.push(tempX);
y.push([data[i].y]);
@cnjimbo
cnjimbo / PasswordUtility.cs
Last active March 21, 2017 09:16 — forked from tiesont/PasswordUtility.cs
This is the Crypto class from System.Web, modified to remove globalization support (which is the only dependency Crypto has on System.Web). It also adds an optional parameter to the hash and verify methods to allow callers to increase the hash iteration count. Everything else is unchanged.
using System;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
public class PasswordUtility
{
// Original Version Copyright:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Original License: http://www.apache.org/licenses/LICENSE-2.0