Skip to content

Instantly share code, notes, and snippets.

View yasmuru's full-sized avatar
🎯
Focusing

Murugan D yasmuru

🎯
Focusing
View GitHub Profile
@yasmuru
yasmuru / RemoveEnvFile.txt
Last active August 21, 2024 13:48
Remove .env file from Github
// this will remove the file from repository
git rm -r --cached .env
// This will remove from the history
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
git push --force
// now .env file may be there but empty
@yasmuru
yasmuru / erc20.go
Created October 13, 2023 06:29 — forked from miguelmota/erc20.go
Go go-ethereum watch ERC-20 token transfer events
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package token
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
@yasmuru
yasmuru / request.ts
Created December 30, 2019 06:10
Typescript XMLHttpRequest
export interface RequestOptions {
ignoreCache?: boolean;
headers?: {[key: string]:string};
// 0 (or negative) to wait forever
timeout?: number;
}
export const DEFAULT_REQUEST_OPTIONS = {
ignoreCache: false,
headers: {
@yasmuru
yasmuru / decorators.py
Last active October 29, 2019 07:21
Useful Django Decorators
# To pass optional arguments to decorator
def the_decorator(arg1, arg2):
def _method_wrapper(view_method):
def _arguments_wrapper(request, *args, **kwargs) :
"""
Wrapper with arguments to invoke the method
"""