Skip to content

Instantly share code, notes, and snippets.

View r1walz's full-sized avatar
:electron:
Building Something BIG

Rohit Ashiwal r1walz

:electron:
Building Something BIG
View GitHub Profile
@r1walz
r1walz / config.json
Last active August 28, 2020 18:42
Github config for https://github.com/simonhaenisch/md-to-pdf version:2.6.4
{
"pdf_options": {
"format": "A4",
"margin": "10mm 20mm 0mm 20mm",
"printBackground": true
},
"stylesheet": ["https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css"],
"body_class": ["markdown-body"],
"css": ".page-break{page-break-after:always}.markdown-body{font-size:12px}.markdown-body pre>code{white-space:pre-wrap}"
}
@r1walz
r1walz / .gitconfig
Created August 12, 2020 10:22
General Script to send emails
[user]
name = Rohit Ashiwal
#email = rohit.ashiwal265@gmail.com
email = rashiwal@studentambassadors.com
[sendemail]
smtpencryption = tls
smtpserverport = 587
smtppass = **your password**
#smtpserver = smtp.gmail.com
#smtpuser = rohit.ashiwal265@gmail.com
@r1walz
r1walz / _experiment.md
Last active May 5, 2020 18:33
A quantum experiment to challenge our classical understandings!

A Quantum Experiment

Here is an experiment that can't be described by our natural (classical)
senses!

Suppose we have an experiment setup consisting of a photon source, a beam
splitter (which was once implemented using a half-silvered mirror), and a
pair of photon detectors. Have a look at the figure!

initial setup

#!/bin/bash
CC=
TMP=0
MAX=0
ARCH=$(uname -m)
greater () {
return $(awk -v a=$1 -v b=$2 'BEGIN { printf "%d", (a > b ? 1 : 0) }')
}
@r1walz
r1walz / simd.cpp
Last active March 12, 2020 10:35
A simple program crafted using the power of SIMD programming: $ g++ -O0 simd.cpp -o main && ./main
#include <cmath>
#include <cfloat>
#include <iostream>
#include <xmmintrin.h>
#define start_routine() int begtime = clock();
#define end_routine() do { \
int endtime = clock(); \
std::cerr << "\n" << "Time elapsed: " \
@r1walz
r1walz / template.cpp
Last active December 11, 2019 18:16
My competitive programming template
#include <bits/stdc++.h>
using namespace std;
#define FAST_IO() do { \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL); \
} while (0);
#define start_routine() int begtime = clock();
#define end_routine() do { \
@r1walz
r1walz / cmds.sh
Created June 25, 2019 08:30
Setup to check the workings of apply's ignore-whitespace
# already on master
$ git apply patch2.patch --ignore-whitespace
@r1walz
r1walz / config.mak
Last active May 31, 2019 12:59
config.mak file for Building and Testing Git
O = 0
CFLAGS = -O$(O) -g $(EXTRA_CFLAGS) -Wall
DEVELOPER = 1
DEVOPTS = pedantic
THREADED_DELTA_SEARCH = 1
NO_SVN_TESTS = 1
TMP := /tmp/git-tests-$(shell git rev-parse --show-toplevel | sha1sum | head -c10)
GIT_TEST_OPTS = --root=$(TMP) -q --tee
GIT_PROVE_OPTS = --timer -j8 --state=failed,slow,save
DEFAULT_TEST_TARGET = prove
@r1walz
r1walz / test.sh
Created March 19, 2019 16:13
Setup file to test `git diff --ignore-whitespace -p`
#!/bin/bash
if ! test -d /tmp/tmp
then
mkdir -p /tmp/tmp
else
rm -rf /tmp/tmp
mkdir /tmp/tmp
fi
@r1walz
r1walz / keybase.md
Created March 18, 2019 13:41
My keybase identity

Keybase proof

I hereby claim:

  • I am r1walz on github.
  • I am r1walz (https://keybase.io/r1walz) on keybase.
  • I have a public key whose fingerprint is A84E 633A 0DEF 1480 4659 1DA0 DB58 9B5D 3130 9E1E

To claim this, I am signing this object: