Skip to content

Instantly share code, notes, and snippets.

View harsh183's full-sized avatar
😺
People pleasing users

Harsh Deep harsh183

😺
People pleasing users
View GitHub Profile
@harsh183
harsh183 / index.md
Last active June 16, 2019 10:10
Find the only x, y, z positive integers such that x^3 = (z-y)^3 + 3yz(z-y) Presentation at: https://sleepy-noyce-8b3d2a.netlify.com/#1
theme uncover
marp true

Find the only $x$, $y$, and $z$ positive integers

$$ x^3 = (z - y)^3 + 3yz(z - y)

#!/bin/bash
# This script is my standard create a new experiment for my new idea/side project/whatever that I normally seem to do. I can change this if I like as I move along.
set -ex
mkdir ~/Experiments/$1
cd ~/Experiments/$1
echo "# README" > README.md
#!/bin/bash
# This script is my standard create a new experiment for my new idea/side project/whatever that I normally seem to do. I can change this if I like as I move along.
set -e # Fail if one step fails
set -x # Print before execute
cd ~/Experiments/
mkdir $1
cd $1
<!DOCTYPE html><html lang="C"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>@media screen{body,html{background:#000;height:100%;margin:0;overflow:hidden}[data-bespoke-marp-fragment=inactive]{visibility:hidden}.bespoke-marp-osc{display:none;opacity:0}.bespoke-marp-parent{bottom:0;left:0;position:absolute;right:0;top:0}.bespoke-marp-parent>.bespoke-marp-osc{background:rgba(0,0,0,.65);border-radius:7px;bottom:50px;color:#fff;display:block;font-family:Helvetica,Arial,sans-serif;font-size:16px;left:50%;line-height:0;opacity:1;padding:12px;position:absolute;touch-action:manipulation;-webkit-transform:translateX(-50%);transform:translateX(-50%);transition:opacity .2s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-
set number
syntax on
set mouse=a
set softtabstop=4
set tabstop=4 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4 " Sets the number of columns for a TAB
#!bin/bash
# Usage:
# bash jekyll_new.sh file_title
# Example:
# bash jekyll_new.sh daily-angst
# This script is for creating a new jeykll post under _posts/
# Change as needed
@harsh183
harsh183 / paul_graham_site_improve.user.js
Created May 5, 2019 07:12
Opinated userscript that makes Paul Graham's website slightly nicer to me to read since I go there a lot.
// ==UserScript==
// @name Paul Graham website beautifier
// @version 1
// @grant none
// ==/UserScript==
// Based off http://bettermotherfuckingwebsite.com/
var styles = `
body {
@harsh183
harsh183 / uiuc-course-explorer-direct-search.user.js
Last active March 14, 2021 22:16
UIUC Course Explore Direct Search Modification. Normally the UIUC Course Website search bar doesn't directly let you go to the Course page directly as the search bar only takes the department. This adds the functionality without breaking any existing usage.
// ==UserScript==
// @name UIUC course explorer direct enter course number
// @version 1
// @grant none
// ==/UserScript==
// @author Harsh Deep <harsh183>
// @date 2019-05-04
// @for https://courses.illinois.edu/*
@harsh183
harsh183 / Dockerfile
Last active July 28, 2020 10:54
Single chain rabbitMQ for distributed ruby task (here squaring and then cubing the number) - bit of copy paste but you get it
FROM rabbitmq:3.7.7-alpine
run rabbitmq-plugins enable --offline rabbitmq_web_stomp
run \
echo 'loopback_users.guest = false' >> /etc/rabbitmq/rabbitmq.conf && \
echo 'web_stomp.ws_frame = binary' >> /etc/rabbitmq/rabbitmq.conf
EXPOSE 15674
@harsh183
harsh183 / uiuc-google-login.rb
Created January 15, 2019 02:44
This script uses selenium to login into uiuc's google apps login.
require 'watir'
require 'webdrivers'
@browser = Watir::Browser.new :firefox
# Standard google apps login page
@browser.goto("https://accounts.google.com/signin/v2/identifier?hl=en&passive=true&continue=https%3A%2F%2Fwww.google.com%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin")
# First pass google (google is weird, my input field selectors weren't )
@browser.send_keys "hdeep2@illinois.edu" # Can be anything that exists