Skip to content

Instantly share code, notes, and snippets.

Jimmy Chandra jchandra74

  • Sydney, NSW, Australia
Block or report user

Report or block jchandra74

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jchandra74 / index.html
Created Feb 7, 2020
JS Bin Implementation of Find First Non Repeatable Character in a String // source
View index.html
<!DOCTYPE html>
<meta name="description" content="Implementation of Find First Non Repeatable Character in a String">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
jchandra74 / openssl.MD
Last active Mar 25, 2020
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window
View openssl.MD

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window


My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

View Guid Generator

PowerShell GUID Generator

From time to time, I need to generate GUID to be used as Unique Id for whatever reason. When I have Visual Studio opened, I usually use the GUID tool that comes with it.

But sometimes I am developing in VS Code and opening Visual Studio just to get access to the GUID tool is a pain.

So why not add the functionality to PowerShell instead? You can have PowerShell available from inside VS Code Terminal. It's the perfect thing to add.

So how do we go about that?

jchandra74 / PowerShell
Last active Mar 27, 2020
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization
View PowerShell

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

jchandra74 / NullifyEmptyProperties.cs
Created Sep 7, 2016
Object graph walker that will clean up empty array, generic collection and string
View NullifyEmptyProperties.cs
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Foo
public static class ObjectExtensions
public static void NullifyEmptyProperties(this object o)
jchandra74 / index.html
Last active Apr 2, 2016
Angular Speech API Times Table Quiz for Kids
View index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<link data-require="bootstrap-css@3.3.6" data-semver="3.3.6" rel="stylesheet" href="" />
<link rel="stylesheet" href="styles.css">
<div class="container" ng-app="app" ng-controller="pageCtrl as page">
jchandra74 / FileUtil.cs
Last active Aug 29, 2015
Detect MimeType and File Extension based on filename and falling back to fileStream for signature detection (specific to .binary extension)
View FileUtil.cs
public static class FileUtil
public static string DetectFileType(string filename, Stream fileStream)
var ext = Path.GetExtension(filename);
if (string.IsNullOrEmpty(ext))
jchandra74 / SHA1Util.cs
Last active Apr 3, 2019 — forked from kristopherjohnson/SHA1Util.cs
SHA1 Hash for Unicode string
View SHA1Util.cs
//Forked from kristopherjohnson/SHA1Util.cs gist
using System.Security.Cryptography;
using System.Text;
namespace Snippets
public static class SHA1Util
/// <summary>
/// Compute hash for string encoded as UTF8
jchandra74 / binary2hex.cs
Created Apr 14, 2015
Binary to Hex String Conversion
View binary2hex.cs
public static string BinaryToHex(byte[] data)
if (data == null)
return null;
var array = new char[checked(data.Length*2)];
for (var i = 0; i < data.Length; i++)
View StringExtension.cs
namespace __NAMESPACE__
using System.Text;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
public static class StringExtension
public static string StripInvalidUnicodeCharacters(this string str)
You can’t perform that action at this time.