Skip to content

Instantly share code, notes, and snippets.

View evamvid's full-sized avatar

Evamvid Sharma evamvid

View GitHub Profile

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "../../flashloan/base/FlashLoanReceiverBase.sol";
import "../../configuration/LendingPoolAddressesProvider.sol";
import "../../lendingpool/LendingPool.sol";
contract FlashLoanReceiverExample is FlashLoanReceiverBase {
@chuckleplant
chuckleplant / google-locs-geotagger.py
Last active October 8, 2023 20:20
Little script that will automatically add GPS data to Jpeg images based on your Google location history, you can get it from https://takeout.google.com/
import os
import glob
import argparse
import json
import datetime
import time
from bisect import bisect_left, bisect_right
from PIL import Image
from pexif import JpegFile
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet
@juliushaertl
juliushaertl / google-location-history-to-gpx.md
Last active February 1, 2024 08:59
google-location-history-to-gpx

convert google takeout archive for location history from kml to gpx and split file into one per day

gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 gpxsplitter.py split.gpx
@beefy
beefy / chess_scrape.py
Last active December 29, 2020 03:56
Scrapes all live chess game PGNs from chess.com and concatenates the resulting files
#!/usr/bin/python
import spynner
import pyquery
import urllib
import os
# author: Nate Schultz
# contact: github.com/beefy
# created: 10/22/16
@epijim
epijim / googlelatitude_to_plot.py
Last active July 22, 2022 09:44
Take location data from google takeout, convert from json to kml and overlay on satellite photo
#I've merged code from two different sources, originally published by github users snowdonjames and Scarygami
#Import JSON, spit out KML
#usage.. location_history_json_converter.py input output [-h] [-f {kml,json,csv,js,gpx,gpxtracks}] [-v]
from __future__ import division
import sys
import json
import math