Skip to content

Instantly share code, notes, and snippets.

View hemkaran's full-sized avatar
😎
Moving Ahead

Hemkaran Raghav hemkaran

😎
Moving Ahead
View GitHub Profile
@hemkaran
hemkaran / git-shortcuts.config
Last active June 17, 2021 07:51
Git alias for faster use of git commands
[alias]
co = checkout
s = status
cob = checkout -b
del = branch -D
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
br = branch
go = push origin HEAD
gof = push origin HEAD --force
lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
@hemkaran
hemkaran / String_comparison_1.js
Created July 21, 2019 14:37
React Meetup Talk: I don't know that
function compare() {
return [
'aBcD' === 'abcd',
'åbcd' === 'abcd',
]
}
console.log(compare()); //
@hemkaran
hemkaran / using-web-worker-step-4.js
Created February 28, 2018 14:00
This file demonstrate using web worker to compress the data at frontend side (step 4)
/**
* Called when worker will be initialized
* @param worker
*/
function workerInitialized (worker) {
// This will be called when worker finished compressing data. you can access data at e.data
worker.onmessage = function (e) {
console.log(e.data);
sendData(e.data);
@hemkaran
hemkaran / using-web-worker-step-3.js
Created February 28, 2018 13:59
This file demonstrate using web worker to compress the data at frontend side (step 3)
$.ajax({
url: workerUrl,
dataType: 'text',
success: function (data) {
try {
// Create a blob of the file content, so that we can create blob URL out of it, that can
// be passed to create a web worker file (that runs in the background thread)
var blob = new window.Blob([data], {type: 'text/javascript'});
var workerBlobUrl = window.URL.createObjectURL(blob);
@hemkaran
hemkaran / using-web-worker-step-2.js
Created February 28, 2018 13:56
This file demonstrate using web worker to compress the data at frontend side (step 2)
$.ajax({
url: workerUrl,
dataType: 'text',
success: function (data) {
try {
// Create a blob of the file content, so that we can create blob URL out of it, that can
// be passed to create a web worker file (that runs in the background thread)
var blob = new window.Blob([data], {type: 'text/javascript'});
workerBlobUrl = window.URL.createObjectURL(blob);
@hemkaran
hemkaran / using-web-worker-step-1.js
Created February 28, 2018 13:54
This file demonstrate using web worker to compress the data at frontend side
// URL of the worker file to load
var workerUrl = '/dist/worker.js';
$.ajax({
url: workerUrl,
dataType: 'text',
success: function (data) {
// data has the file content
}
});
License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====