Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
curl 'https://2.rome.api.flipkart.com/api/4/page/fetch' -X POST \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0' \
-H 'Accept: */*' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Content-Type: application/json' \
-H 'X-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0 FKUA/website/42/website/Desktop' \
-H 'Origin: https://www.flipkart.com' \
@kgrz
kgrz / temp
Created December 17, 2021 08:14
~/Documents/flipkart/rukmini-debug master
g c
[master dd4f1e4] X
1 file changed, 13 insertions(+), 38 deletions(-)
rewrite README.md (64%)
~/Documents/flipkart/rukmini-debug master ⇡
g p
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
[
{
"date": "2021-01-01",
"events": [
{
"name": "Team Standup",
"time": "2021-01-01 10:00:00 +0530",
"duration_minutes": 30,
"accepted": false
},
// Current implementation, which won't have feedback loop closed with PX, and
// allows for false positives
class PXFilter implements Filter {
private PerimeterX enforcer;
public void init() {
PXConfiguration pxConfiguration = PXConfiguration.builder()
.build();
enforcer = new PerimeterX(pxConfiguration);
}
curl 'https://2.rome.api.flipkart.com/api/4/page/fetch' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'X-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.5 Safari/537.36 FKUA/website/42/website/Desktop' \
-H 'Content-Type: application/json' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.5 Safari/537.36' \
-H 'sec-ch-ua-platform: "macOS"' \

You won't be judged on you colour choices or general neatness of the UI, so no need to spend too much time deciding colours. Some logical separation of the contents, even if they're completely black-and-white is fine. You will, however, be judged on code-organisation, naming.

  1. Build a month's view of a calendar
    • There are three states for each event: A full day event, a timed event that's accepted, a timed event that's not accepted. Try to represent these states in the UI, similar to any other calendar app.
  • The month's view should show the overflow days from previous month and
@kgrz
kgrz / lvn.md
Created August 12, 2021 15:08 — forked from mtds/lvn.md
Linux Virtual Networking

Virtual Networking on Linux

In the Linux Kernel, support for networking hardware and the methods to interact with these devices is standardized by the socket API:

                +----------------+
                |   Socket API   |
                +-------+--------+
                        |
User space              |

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty.

Get an ip address for en0:

@kgrz
kgrz / nginx.conf
Created January 26, 2021 11:57 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048