Skip to content

Instantly share code, notes, and snippets.

View rounakdatta's full-sized avatar

Rounak Datta rounakdatta

View GitHub Profile
@rounakdatta
rounakdatta / add_dns_record.sh
Created August 22, 2023 12:14
No stress local proxying
echo '127.0.0.1 my-project.localhost' | sudo tee -a /etc/hosts
@rounakdatta
rounakdatta / private_transfer.md
Last active May 12, 2021 19:21
Moving private keys securely between devices

There is no transfer method more secure than using a physical USB storage to move the private key. However, often connecting physical devices is a barrier and at other times is an opposite wind. So, we'll create a simple HTTP server over a private (home) network and use that for the transfer.

Origin

Let us first export the GPG private and public keys:

gpg --output private.key --armor --export-secret-keys me@email.com
gpg --output public.key --armor --export me@email.com
@rounakdatta
rounakdatta / chrome2pass.py
Created August 29, 2020 21:41
export from Chrome Passwords to standard pass
#!/usr/bin/env python3
# Copyright 2015 David Francoeur <dfrancoeur04@gmail.com>
# Copyright 2017 Nathan Sommer <nsommer@wooster.edu>
# Modified 2020 Rounak Datta <rounakdatta12@gmail.com>
#
# This file is licensed under the GPLv2+. Please see COPYING for more
# information.
#
# Chrome allows export passwords to CSV. The CSV contains the following
@rounakdatta
rounakdatta / aws-temp-token.sh
Last active July 9, 2020 08:33 — forked from ogavrisevs/aws-temp-token.sh
Script to generate AWS STS token
#!/bin/bash
#
# Sample for getting temp session token from AWS STS
#
# aws --profile youriamuser sts get-session-token --duration 3600 \
# --serial-number arn:aws:iam::012345678901:mfa/user --token-code 012345
#
# Based on : https://github.com/EvidentSecurity/MFAonCLI/blob/master/aws-temp-token.sh
#
@rounakdatta
rounakdatta / overleafTips.md
Last active May 2, 2020 14:13
Overleaf tips

Correcting citations

Regex for searching citations on Overleaf (looks like [4], [64]): [[0-9]+]

@rounakdatta
rounakdatta / kafka.md
Created March 26, 2020 05:32 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
@rounakdatta
rounakdatta / tmux-cheatsheet.markdown
Created March 25, 2020 05:41 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@rounakdatta
rounakdatta / ConsumerExample.scala
Created March 20, 2020 05:50 — forked from fancellu/ConsumerExample.scala
Kafka Producer/Consumer Example in Scala
import java.util
import org.apache.kafka.clients.consumer.KafkaConsumer
import scala.collection.JavaConverters._
object ConsumerExample extends App {
import java.util.Properties
@rounakdatta
rounakdatta / flashWriterSample.ino
Created November 15, 2019 19:38
Sample program to demonstrate writing a character array to the EEPROM (flash) of ESP[32/8266]
#include "EEPROM.h"
int addr = 0;
#define EEPROM_SIZE 64
// the sample text which we are storing in EEPROM
char ssid[64] = "CARNIVAL OF RUST";
void setup() {
Serial.begin(115200);
[{
"name": "Data Science Intern (Summer 2020)",
"companyName": "Reddit",
"link": "https://boards.greenhouse.io/reddit/jobs/1896478",
"process": ["Applied", "Interviewing", "Offer"],
"cid": 30,
"industry": "Social",
"iid": 187,
"location": "San Francisco"
}, {