Skip to content

Instantly share code, notes, and snippets.

View viktree's full-sized avatar
🧀

Vikram Venkataramanan viktree

🧀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am viktree on github.
  • I am viktree (https://keybase.io/viktree) on keybase.
  • I have a public key whose fingerprint is 1F69 E071 9C8E A7C1 1979 64B7 64A5 5AC1 A01B 1B16

To claim this, I am signing this object:

@viktree
viktree / unused-nock.ts
Last active May 2, 2021 01:32
How to use nock to assert a network call is not made.
import nock from "nock";
import axios from "axios";
// https://ratesapi.io
const getExchangeRate = async () => {
try {
const response = await axios.get("https://api.ratesapi.io/api/latest");
const res = response.data;
return res;
@viktree
viktree / stylus-work-2018-11-28.json
Last active November 28, 2018 18:21
Styles that I use at work.
[
{
"enabled": true,
"updateUrl": "https://userstyles.org/styles/chrome/154743.json?",
"md5Url": "https://update.userstyles.org/154743.md5",
"url": "http://userstyles.org/styles/154743",
"originalMd5": "883fc80a16448ae227dd4d083412e6d2",
"installDate": 1534948316842,
"sections": [
{
/**
* This file demonstrates how we can use javascript to get from and create
* events for google calender.
*
* THE FIRST TIME YOU MIGHT BE PROMPTED TO SIGN IN.
*
* To use this snippet of code, you need to
* 1. Run `npm install googleapis@27 --save` to obtain the nodejs
* implementation of the google api
* 2. Go to https://developers.google.com/calendar/quickstart/nodejs and