Skip to content

Instantly share code, notes, and snippets.

Anxiety. It’s a swarm of thousands of tiny, bright yellow, buzzing insects. On the best of days it’s just kind of … there. Just at the edge of your vision, a low hum, threatening to attack, to cover the world around you with the yellow.

On the worst of days, it’s on your skin, vibrating. It covers every inch of your body, feeding on your discomfort, the oil and sweat and grime on your body. It clouds your vision completely. It’s in your ears, making it difficult to hear the sounds of the world around you. It doesn’t sting, doesn’t bite, but it’s a sensation that overwhelms all other sensations.

# Sort a flat directory full of Markdown files named using the
# YYYY-MM-DD format into a directory tree that looks something like
# the following:
#
# 2023/
# 01 - January/
# 2023-01-12.md
# 2023-01-19.md
# 2023-01-28.md
# 02 - February/
  • Processor: AMD Ryzen 5 5600x 3.7GHz 6-core
  • Motherboard: ASUS ROG STRIX B550-F Gaming + WiFi ATX AM4
  • RAM: Kingston HyperX Fury 16GB DDR4 3200 CL16
  • Disk: Samsung 970 Evo 1TB M.2-2280 NVME SSD
  • Power supply: Gigabyte P GM 750 W 80+ Gold Certified Modular ATX PSU
  • GPU: Colorful NVidia Geforce RTX 3070 NV-B (with 8GB memory)
  • Monitor: BenQ EL2870U 28" 4K Gaming Monitor
  • Keyboard: Razer BlackWidow V3 Tenkeyless
  • Mouse: Razer Viper Mini
  • CPU Cooler: Deepcool Gammaxx L240 V2 Liquid Cooler
use regex::Regex;
use std::fs::read_to_string;
fn is_pass_valid_1(min: u32, max: u32, letter: char, pass: &str) -> bool {
let mut letter_count = 0;
for c in pass.chars() {
if c == letter {
letter_count = letter_count + 1;
}
use std::collections::HashSet;
use std::fs::read_to_string;
fn main() {
let input = read_to_string("input.txt").unwrap();
let mut x = 0;
let mut max_x = 0;
let mut y = 0;
let mut trees: HashSet<(u16, u16)> = HashSet::new();
@s3thi
s3thi / init.el
Created September 17, 2020 06:04
;; Installed packages: smex, disable-mouse, projectile, restclient,
;; flycheck, company, exec-path-from-shell, add-node-modules-path,
;; prettier-js, markdown-mode, deadgrep, gruvbox-theme
(require 'package)
(add-to-list 'package-archives `("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
struct TodoListRoot<T: Data> {
inner: WidgetPod<T, Box<dyn Widget<T>>>,
}
impl<T: Data> TodoListRoot<T> {
fn new(inner: impl Widget<T> + 'static) -> Self {
Self {
inner: WidgetPod::new(inner).boxed(),
}
}
export default compose(
connect(state => ({
lifeAreasByKey: state.firestore.data.life_areas,
lifeAreasOrdered: state.firestore.ordered.life_areas,
})),
firestoreConnect(props => [
{ collection: "life_areas", where: [["user_id", "==", props.auth.uid]] }
])
)(MyApp);
rewrite ^/?$ https://blog.ankursethi.in last;
rewrite ^/2014/01/book-review-the-essence-of-camphor-by-naiyer-masud/?$ https://blog.ankursethi.in/book-review-the-essence-of-camphor-by-naiyer-masud-230346b579e9 last;
rewrite ^/2014/01/my-reading-list-for-2014/?$ https://blog.ankursethi.in/my-reading-list-for-2014-604b10d1a74a last;
rewrite ^/2014/01/2013-year-in-review/?$ https://blog.ankursethi.in/2013-year-in-review-893e995816ca last;
rewrite ^/2013/07/loading-spinners-with-angularjs-and-spin-js/?$ https://blog.ankursethi.in/loading-spinners-with-angularjs-and-spin-js-dc1e4a57df8a last;
rewrite ^/2013/07/simulating-a-slow-internet-connection/?$ https://blog.ankursethi.in/simulating-a-slow-internet-connection-f6c883b4e0a6 last;
rewrite ^/2013/05/an-introduction-to-cmake/?$ https://blog.ankursethi.in/an-introduction-to-cmake-43b4f08ac453 last;
rewrite ^/2013/04/all-about-iteration/?$ https://blog.ankursethi.in/all-about-iteration-40aed6712632 last;
rewrite ^/2013/04/tastypie-and-timezones/?$ https://blog.ankurs

Motivation

  • Most of abof's traffic is mobile (true for most e-commerce companies in India)
  • Old website took ~20s to load on 3G, which killed conversion rates
  • We got it down to <5s, increasing conversion rates by 40%

Part 1: Building abof.com

  • Choosing a tech stack
  • The competition: React, Angular, Angular 2, Riot, Vue