Skip to content

Instantly share code, notes, and snippets.

View sudarshang's full-sized avatar

Sudarshan Gaikaiwari sudarshang

View GitHub Profile
@bdsqqq
bdsqqq / vesper-dark.json
Last active April 1, 2024 17:44
Vesper theme for zed.dev
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Vesper",
"author": "Rauno Freiberg",
"themes": [
{
"name": "Vesper",
"appearance": "dark",
"style": {
"border": "#101010",
@cramforce
cramforce / vc.md
Last active April 18, 2021 17:42
Malte's home video conferencing setup
  • Lights: Elgato Key Lights (2, one as actual key light, one as fill light)
    • Looking into these lights can cause fatigue after a while, which sucks if you're doing that all day.
    • I managed to work around it by heavily dimming one light that is in my field of view and moving the other light out of my field of view.
  • Microphone: Blue Snowball Ice
  • Microphone pop filter
  • Wall/ceiling mounts for camera and lights
  • Camera: Sony a6000.
    • This is one of multiple older Sony mirrorless cameras recommended for streaming.
  • Whichever you buy, make sure the reviews mention that it can stay on
@markerikson
markerikson / reactiflux-chat-react-hooks-storage.md
Created September 14, 2019 00:31
Reactiflux chat log: How does React store hooks on Fibers?

[12:14 AM] acreddy : are hooks value stored in fiber?

[10:40 AM] ghardin137 : not really

[10:50 AM] acemarke : @acreddy, @ghardin137 : yes they are, actually.

A "fiber" is a plain JS object that React uses to store bookkeeping information on each rendered component in the tree. The linked list of hooks is indeed stored as a field on the fiber for that component

@threepointone
threepointone / settled.react.md
Last active August 4, 2020 19:09
Ember's settled() test helper, for React

settled

Stealing an idea from ember's settled test helper.

Assuming these conditions are true in your unit tests -

  • you're using Jest
  • and Jest's fake timers
  • and all your data requests are happening via fetch
#!/usr/bin/env python3
"Generate all strings containing just ( and ) with parens balenced."
from itertools import count
def parens():
def nested(x):
return ("(" * x) + (")" * x) if x > 0 else ""

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@stephenfjohnson
stephenfjohnson / makerLink.js
Created April 16, 2018 16:08
Maker Link with React Styled Components
@adrianhall
adrianhall / AppSync-Example.yaml
Created April 13, 2018 16:01
An example CloudFormation template for AWS AppSync
---
Description: AWSAppSync DynamoDB Example
Resources:
GraphQLApi:
Type: "AWS::AppSync::GraphQLApi"
Properties:
Name: AWSAppSync DynamoDB Example
AuthenticationType: AWS_IAM
PostDynamoDBTableDataSource:

React && Firebase Workshop

Contact Information

Prequisite Setup

  • A recent version of Node.js
  • npm install -g create-react-app
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name