Skip to content

Instantly share code, notes, and snippets.

View arjunbazinga's full-sized avatar

Arjun Srivastava arjunbazinga

View GitHub Profile
@arjunbazinga
arjunbazinga / channel_backup.sh
Created November 5, 2021 12:40
Backup all uploads for a youtube channel
youtube-dl -f best -ciw -o "%(title)s.%(ext)s" -v '#url of channel you want to download'

Keybase proof

I hereby claim:

  • I am arjunbazinga on github.
  • I am arjunsriva (https://keybase.io/arjunsriva) on keybase.
  • I have a public key whose fingerprint is 82BA 0277 6BBB FC28 1A4F 23FB 345F AF42 E9E4 54F1

To claim this, I am signing this object:

@arjunbazinga
arjunbazinga / .bashrc
Created November 2, 2020 16:38
quick .bashrc backup
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@arjunbazinga
arjunbazinga / client.java
Created April 18, 2019 08:10
simple java socket example
import java.net.Socket;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class client {
public static void main(String[] args) throws Exception {
Socket s = new Socket("localhost", 9998);
@arjunbazinga
arjunbazinga / backup_script
Created January 3, 2019 06:19
this script automatically creates a new git repository and puts the new folder in the master backup list
#!/bin/bash
# You can customize this script on a per repo basis, add build commands, move huge files (>100 mb) to dropbox, etc.
echo "Backing up "`basename pwd`
git add .
git commit -m "backing up"
git push
echo "done"
@arjunbazinga
arjunbazinga / strcpy.asm
Created January 1, 2019 12:36
MIPS Strcpy Assembly Code
.data
null: .asciiz ""
source: .asciiz "Hello"
dest: .asciiz "World"
.text
la $a0, dest #passing dest mem address
la $a1, source #passing source mem address
@arjunbazinga
arjunbazinga / createTestnet.sh
Created October 23, 2018 15:33
Create Tendermint Testnet on a single macine
#!/bin/bash
# By @arjunbazinga
IP=0.0.0.0
AA=tcp://$IP
rm -rf new_testnet
mkdir new_testnet
cd new_testnet
@arjunbazinga
arjunbazinga / machine_learned_index.py
Created June 16, 2018 04:45 — forked from tokestermw/machine_learned_index.py
Using deep learning to approximate a B-Tree index from this paper: https://arxiv.org/abs/1712.01208 (The Case for Learned Index Structures)
import click
import torch
import torch.autograd
import torch.nn.functional as F
from torch.autograd import Variable
import os
import random
import math