Skip to content

Instantly share code, notes, and snippets.

@sidharthv96
sidharthv96 / Readme.md
Last active September 7, 2022 11:13
Vitest template literal support for it.each

Used to convert jest's Tagged Template literals to object arrays as required by vitest. Example: Jest code

it.each`
str       | expected
${'1d'}   | ${moment.duration(1, 'd')}
${'2w'}   | ${moment.duration(2, 'w')}
`('should parse $str to $expected duration', ({ str, expected }) => {
 expect(yourFunction(str)).toEqual(expected);

Keybase proof

I hereby claim:

  • I am sidharthv96 on github.
  • I am sidharthv (https://keybase.io/sidharthv) on keybase.
  • I have a public key ASAckvsLh1YE7MvT5tjYxLL1FXC20S0SycsfPye4Gu2-TQo

To claim this, I am signing this object:

{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Richard Hendriks",
"label": "Programmer",
"image": "",
"email": "[email protected]",
"phone": "(912) 555-4321",
"url": "http://richardhendricks.example.com",
"summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinal!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a “length-limited” conversation!",
@sidharthv96
sidharthv96 / config.fish
Last active April 25, 2018 13:54 — forked from ronaldsuwandi/config.fish
My personal fish shell config for OS X (better blue colour for directory in dark terminal). Supports git branch
function adbc --description 'ADB Network Connect'
command adb connect $argv
end
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
@sidharthv96
sidharthv96 / results.sh
Last active December 20, 2015 11:25
Script to fetch the results. Save the file as results.sh. Enter your roll number inside the file. Execute the command chmod +x results.sh . Then run using ./results.sh
id=$(date | md5 | head -c 26)
echo $id
mkdir "D$id"
for reg in {1..9}
do
echo -e "\n\n\n----------------------------------------------------------------------------------------\n$reg"
curl "http://202.88.252.21/CuPbhavan/res_newregentry.php?id=4789" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Referer: http://202.88.252.21/CuPbhavan/curesultonline.php" -H "X-DevTools-Emulate-Network-Conditions-Client-Id: 77109F89-1E59-4D14-902A-4FEF1DEC0380" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36" --compressed --data "regno=ETAOECS00$reg&sum=107&id=4789&sessionok=yes" --compressed -o 1.html
@sidharthv96
sidharthv96 / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;