Skip to content

Instantly share code, notes, and snippets.

View gurpreetatwal's full-sized avatar

Gurpreet Atwal gurpreetatwal

View GitHub Profile
@gurpreetatwal
gurpreetatwal / router.ts
Created January 2, 2024 22:09
CloudWatch Link Redirect Code
import Router from '@koa/router';
import { isString } from 'type-guards';
import { DateTime } from 'luxon';
import { URLSearchParams } from 'url';
import fs from 'fs/promises';
const router = new Router();
const aliases = {} as { [key: string]: string };
const relativeTimeUnitMap = {

Keybase proof

I hereby claim:

  • I am gurpreetatwal on github.
  • I am gurpreetatwal (https://keybase.io/gurpreetatwal) on keybase.
  • I have a public key ASCasLL5cHiFHjsLa1BuauuZCN7RUaE3Vy8sSsvsHqrQ0go

To claim this, I am signing this object:

{
"name": "optional-dep-testing",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"optional-dep": {
"version": "1.0.0",
"resolved": "github:gurpreetatwal/optional-dep#7a990fa0d1c3799800e0af1826124b8a25b9f0ac",
"optional": true
@gurpreetatwal
gurpreetatwal / javascript.json
Last active August 2, 2016 20:55
VS Code JS snippets
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');"
],
"description": "Log output to console"
},
"Create a test suite": {
"prefix": "suite",
@gurpreetatwal
gurpreetatwal / install.sh
Last active November 11, 2016 09:31
Install script for linux systems
#!/bin/bash
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y vim curl git nodejs build-essential tmux xclip
redis-tools
sudo npm i -g npm bower browser-sync eslint nodemon yo bunyan gulp