Skip to content

Instantly share code, notes, and snippets.

Touhidur Rahman touhidrahman

Block or report user

Report or block touhidrahman

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
@touhidrahman
touhidrahman / github-ubuntu.sh
Created Oct 15, 2018 — forked from dstroot/github-ubuntu.sh
Setting up github on Ubuntu
View github-ubuntu.sh
#!/bin/bash
###############################################
# To use:
# wget https://raw.github.com/gist/4411254
# chmod 777 github-ubuntu.sh
# ./github-ubuntu.sh
###############################################
echo "*****************************************"
echo " Step 1: Check your keys"
echo "*****************************************"
@touhidrahman
touhidrahman / flatten.ts
Last active Oct 11, 2018
Flatten a javascript object in specified structure (see comment block)
View flatten.ts
/**
* Run file
*
* `tsc flatten.ts && node flatten.js`
*
* Given following object:
{
test: "test1",
same: "same",
nested: {
@touhidrahman
touhidrahman / objectdiff.ts
Last active Oct 11, 2018
Compare two similar/identical javascript objects for differences. Returns the changed properties filled with updated value, and unchanged fields with null.
View objectdiff.ts
export class ObjectDiff {
isObject(obj: Object): boolean {
return typeof obj === 'object' && !Array.isArray(obj)
}
isArray(obj: Object): boolean {
return Array.isArray(obj)
}
You can’t perform that action at this time.