Skip to content

Instantly share code, notes, and snippets.

View 2016rshah's full-sized avatar

Rushi Shah 2016rshah

View GitHub Profile
@2016rshah
2016rshah / 1 README.txt
Last active July 26, 2021 22:16
LOPD Outlook Discovery Download Script
Instructions for running code from Microsoft Outlook
Enable the developer tab in the Outlook ribbon
File -> Options -> Customize Ribbon -> Developer -> Add
Enable macros
Developer tab -> Macro Security -> Macro Settings -> Enable all macros
Open the developer editor
Developer tab -> Visual Basic
Start/open the macro file
Project1 -> Microsoft Outlook Objects -> ThisOutlookSession
Copy and paste the code from github
(declare-rel inv (Int))
(declare-var x0 Int)
(declare-var x1 Int)
(declare-rel fail ())
(rule (=> (= x0 10) (inv x0)))
(rule (=> (and (inv x0) (= x1 (+ x0 x0))) (inv x1)))
(rule (=>
@2016rshah
2016rshah / .emacs
Last active January 27, 2023 17:39
Default emacs setup
;; Don't forget to
;; - update to latest version of emacs, mac osx default is super old
;; - go to terminal preferences and use option key as meta or something like that
;; https://melpa.org/#/getting-started
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
@2016rshah
2016rshah / .bash_profile
Last active June 6, 2018 02:28
Default terminal setup
# Custom prompt
#---------------
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Make Git branch a variable
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
# Includes custom character for the prompt, path, and Git branch name.
@2016rshah
2016rshah / scraper.py
Last active August 27, 2018 16:10
UT Directory Web Scraper
# Usage:
# python3 script.py input.txt output.txt
# (don't forget to take names out of input.txt when you're done with them)
import sys
import requests
from bs4 import BeautifulSoup
baseURL = 'https://directory.utexas.edu/index.php'
def getEmailFromName(name):
#include "stdint.h"
#include "debug.h"
#include "thread.h"
#include "ide.h"
#include "bobfs.h"
void check(const char* name, StrongPtr<Node> f) {
if (f.isNull()) {
Debug::printf("*** 0 %s is null\n",name);
return;
(require 'package)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-archives
(quote
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/"))))
@2016rshah
2016rshah / cpu-from-class.v
Last active April 4, 2017 23:54
The code we wrote as a class together on the projector today
`timescale 1ps/1ps
module main();
initial begin
$dumpfile("cpu.vcd");
$dumpvars(0,main);
end
// clock
@2016rshah
2016rshah / .emacs
Last active November 2, 2017 20:38
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
(package-initialize)
;; Stuff for Haskell
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
submitPush() {
git add .
git commit -m "$1"
git push origin master
cwd=$(pwd)
cd ../
git add .
git commit -m "$1"