Skip to content

Instantly share code, notes, and snippets.

View maxsam4's full-sized avatar
🏠
Working from home

Mudit Gupta maxsam4

🏠
Working from home
View GitHub Profile
@maxsam4
maxsam4 / calSync.js
Last active March 24, 2023 19:27
Sync multiple google calendars
// *******************
// This setup will allow you to synchronize personal events from one calendar (the "secondary calendar")
// to another calendar, e.g. work (the "primary calendar"), but obfuscate the details. Then your coworkers
// know when you're busy but don't get to see the personal details.
//
// Follow these steps:
// 1. Go to https://script.google.com/home and click [+ New project]
// 2. Make sure the two calendars you want to sync can be edited by the Google account you're currently under
// (or switch accounts)
// 3. Click the title and give it a name like "Calendar sync"
@maxsam4
maxsam4 / userscript.js
Created December 22, 2021 15:37
Coingecko portfolio tracker userscript
// ==UserScript==
// @name Coingecko portfolio on Twitter
// @namespace https://mudit.blog/
// @version 0.1
// @description Replaces the What’s happening / Trending widget on Twitter with a Coingecko portfolio
// @author Mudit Gupta
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant GM_xmlhttpRequest
@maxsam4
maxsam4 / Example.sol
Created June 9, 2019 14:36
Try catch in Solidity
pragma solidity ^0.5.0;
import "./Token.sol";
/**
* @dev This contract showcases a simple Try-catch call in Solidity
*/
contract Example {
Token public token;
uint256 public lastAmount;