Skip to content

Instantly share code, notes, and snippets.

View sushiljainam's full-sized avatar
💻
Working from home

Sushil Jain sushiljainam

💻
Working from home
View GitHub Profile
//regular expressions
v = /^a/.test('asdasaabb');
console.log("/^a/.test('asdasaabb')", v);
console.log("/.*/.test('/^a+b+$/')", /.*/.test('/^a+b+$/'));
console.log("/^\/.*\/$/.test('/^a+b+$/')", /^\/.*\/$/.test('/^a+b+$/'));
console.log("/^\/.\/$/.test('/^a+b+$/')", /^\/.\/$/.test('/^a+b+$/'));
console.log("/^a/.test('/^a+b+$/')", /^a/.test('/^a+b+$/'));
console.log("/^a/.test('/^a+b+$/')", /^a/.test('/^a+b+$/'));
//s = readline();
/*
* @Author: sushiljainam
* @Date: 2018-01-03 12:20:39
* @Last Modified by: sushiljainam
* @Last Modified time: 2018-01-03 12:31:37
*/
//----------------------- common
var afterLongWork = function () {
@sushiljainam
sushiljainam / 2powers100000.txt
Created January 15, 2018 20:55
some huge powers of 2
9990020930143845079440327643300335909804291390541816917715292738631458324642573483274873313324496504031643944455558549300187996607656176562908471354247492875198889629873671093246350427373112479265800278531241088737085605287228390164568691026850675923517914697052857644696801524832345475543250292786520806957770971741102232042976351205330777996897925116619870771785775955521720081320295204617949229259295623920965797873558158667525495797313144806249260261837941305080582686031535134178739622834990886357758062104606636372130587795322344972010808486369541401835851359858035603574021872908155566580607186461268972839794621842267579349638893357247588761959137656762411125020708704870465179396398710109200363934745618090601613377898560296863598558024761448933047052222860131377095958357319485898496404572383875170702242332633436894423297381877733153286944217936125301907868903603663283161502726139934152804071171914923903341874935394455896301292197256417717233543544751552379310892268182402452755752094704642185943862865632744231
@sushiljainam
sushiljainam / redirect.js
Created June 15, 2021 07:16
https redirect via browser
if (location.protocol !== 'https:') {
location.replace('https:'+location.href.substring(location.protocol.length));
}
{
"basics": {
"name": "Sushil Kumar Jain",
"label": "Sr Software Engineer",
"image": "",
"email": "sushiljain1993@gmail.com",
"phone": "(912) 555-4321",
"url": "https://johndoe.com",
"summary": "A summary of John Doe…",
"location": {