Skip to content

Instantly share code, notes, and snippets.

@tejasvi
tejasvi / .cvimrc
Last active December 11, 2019 06:42
cVim for chrome
let searchengine google = "https://www.google.com/search?glp=1&hl=EN&tci=g:2840&uule=w+CAIQICINVW5pdGVkIFN0YXRlcw&q="
let mapleader = ","
map <Leader>r reloadTabUncached
" Displays your public IP address in the status bar
map ci :call getIP<CR>
let blacklists = ["*youtube.com*"]
map ,d scrollFullPageDown
map ,u scrollFullPageUp
let hintcharacters = "fjghtyeirucmdkbnxloewsapqz"
set noautofocus
@tejasvi
tejasvi / pose.py
Last active December 13, 2019 16:42
Pose estimation with OpenPose
import pyrealsense2 as rs
import numpy as np
import cv2
from openpose import pyopenpose as op
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# Configure depth and color streams
pipeline = rs.pipeline()
config = rs.config()
@tejasvi
tejasvi / README.md
Created December 15, 2019 03:29
Solarized for Windows 10
@tejasvi
tejasvi / file
Last active July 29, 2020 11:44
colab ssh
cd $HOME
wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip -qq -n ngrok-stable-linux-amd64.zip && rm ngrok-stable-linux-amd64.zip
apt-add-repository ppa:fish-shell/release-3 -y > /dev/null
apt-get update
apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen
echo root:pass | chpasswd
mkdir -p /var/run/sshd
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkkwZ69HwTep+LDSpU5VbVMK/z1aJMoFjdrZSxLN02K1xVajRmGOY+jZgBHX8mrqEJHS0VXZsZd2V1v0A74z9DEN6vzTiadQmEXQbqVGy7szOlFFxXwBDmqo4l0nl9F9q9De5BVMjsZXI+iXJxTaRD8kkrhMrrZ3i/PenLsv2r4b/zWuoIkD49UuRQXtb9EAC2PgVrH3uy48qiStws/UST/J+lRY+4QdeFlgGP1kqWSYsPHm8SrZsctF0H+sHo6KaTfZNzZFhQ3btKc1xUZ5SVwE8+A/TjPYTuMhwFj7OlQDoNppM4CkokUt3JiZZj+h59/c+sSpHGPbHz+r8gCBKZ u@pc
@tejasvi
tejasvi / dest
Created April 1, 2020 07:08
Coordinates
'{"lat":{"0":49.737890938,"1":48.893762683,"2":49.6272062817,"3":48.1299256123,"4":49.517221979,"5":50.3944193027,"6":47.4845670104,"7":49.7189273061,"8":49.2617919998,"9":48.4041846676,"10":47.5750117106,"11":48.0367318424,"12":49.458327926,"13":48.3970228385,"14":47.9939529041,"15":49.8395180655,"16":49.0378845278,"17":48.1788356336,"18":48.9109193134,"19":48.0500080347,"20":49.9690773632,"21":48.2402721951,"22":49.2923634301,"23":49.3640773318,"24":49.5761394404,"25":49.7331346294,"26":49.0344437457,"27":49.8266293588,"28":48.3084366594,"29":48.3457915293,"30":48.0773187047,"31":48.8918404657,"32":48.0649622632,"33":48.8371803466,"34":49.7194167745,"35":48.9629851712,"36":49.8855583011,"37":48.4305947898,"38":48.7074828169,"39":48.3853556159,"40":49.2369644567,"41":47.8753410163,"42":48.5928472172,"43":47.5953129534,"44":48.8810690971,"45":48.4032897118,"46":48.4058677994,"47":49.7620049469,"48":48.771944142,"49":49.4783016491,"50":48.5025019412,"51":48.6955310894,"52":49.5637232484,"53":49.2471789894,"54"
@tejasvi
tejasvi / install.sh
Created June 19, 2020 22:32
Install Trilium server on Termux
pkg install nodejs python build-essential --no-install-recommends -y
wget https://github.com/zadam/trilium/archive/stable.zip`
unzip stable.zip
cd trilium-stable
mv package-lock.json package-lock.json.bak
sed -i.bak '/electron/d' package.json
npm install [email protected] --ignore-scripts
npm install
node src/www
@tejasvi
tejasvi / solarized_light.theme
Created June 28, 2020 05:28
Solarized light for Windows 10
; Copyleft (ɔ) github/tejasvi
[Theme]
; High Contrast White - IDS_THEME_DISPLAYNAME_HCWHITE
DisplayName=Solarized Light
ThemeId={E8520960-0633-4E7A-837D-FR2004778FE2}
; Computer - SHIDI_SERVER
[CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-109
var chemParse=function(t,e){for(var r="",a=t[t.length-1].loc.start,n=t.length-1;0<=n;n--)t[n].loc.start>a&&(r+=" ",a=t[n].loc.start),r+=t[n].text,a+=t[n].text.length;return texify.go(mhchemParser.go(r,e))},mhchemParser={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var r,a="0",n={parenthesisLevel:0};t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,c=[];;){r!==t?(o=10,r=t):o--;var i=mhchemParser.stateMachines[e],s=i.transitions[a]||i.transitions["*"];t:for(var p=0;p<s.length;p++){var u=mhchemParser.patterns.match_(s[p].pattern,t);if(u){for(var m,h=s[p].task,_=0;_<h.action_.length;_++){if(i.actions[h.action_[_].type_])m=i.actions[h.action_[_].type_](n,u.match_,h.action_[_].option);else{if(!mhchemParser.actions[h.action_[_].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+h.action_[_].type_+")"];m=mhchemParser.actions[h.action_[_].type_](n,u.match_,h.action_[_].option)}mhchemParser.concatArray(c,m)}if(a=h.nextState||a,!(0<t.length)
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.katex=e():t.katex=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.d