Skip to content

Instantly share code, notes, and snippets.

View vinaysshenoy's full-sized avatar

Vinay Shenoy vinaysshenoy

View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Vinay Shenoy",
"label": "Engineering Lead at Qweebi",
"email": "work@vinaysshenoy.com",
"url": "",
"summary": "Software Engineer with 10+ years of experience, specializing in developer experience and consistent engineering delivery.",
"location": {
"countryCode": "SG",
@andreievg
andreievg / schemaspy_postgres_enum.md
Created June 11, 2022 09:10
SchemaSpy Postgres Enum

As per this issue, and own requirements, it would be great for SchemaSpy to show enum variants.

Fix for now:

  • Before running SchemaSpy
  • Manually introspect pg schema
  • Insert enum variants into a comment for the column using enum
  • Make sure to retain column and type comments

Here is example schema:

@danbars
danbars / index.js
Last active March 17, 2024 09:36
Generate Google access token for service-account in Cloudflare workers environment
/**
You can use the code below in Cloudfalre worker environment to generate a Google access token
for a service-account.
Run this code in a worker cron so you always have a fresh token in your KV that can be used by other workers.
The generated token here will be valid for 3600 seconds, but you can change that in your code.
The code assumes that you have a KV mapped to 'PROPERTIES' in you wrangler.toml file
You must create a service-user and assign to it the roles that you need in google console.
Then take the JSON that you get and paste it below
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@vinaysshenoy
vinaysshenoy / bootstrap.sh
Last active November 1, 2023 07:03
Bootstrap file to setup a new account on macOS (10.15+)
#!/bin/zsh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew install jenv
brew install nvm
mkdir ~/.nvm
brew cask install gpg-suite
brew tap AdoptOpenJDK/openjdk
@yuriteixeira
yuriteixeira / puppeteer_chromedevtools_android.md
Created August 28, 2018 08:41
Puppeteer/Chrome Dev Tools Protocol: How to manipulate Android Chrome or WebViews

First of all, get prepared by installing the Android SDK and SDK tools in order to get the adb executable. Then:

  1. adb connect <device ip>

  2. To get the service name `adb shell "cat /proc/net/unix | grep devtools_remote", which will give you something like this output:

00000000: 00000002 00000000 00010000 0001 01 423897 @webview_devtools_remote_18279
courtesy: cmpxchg aka tim murray
suspend is the big hammer. in suspend, you turn off all peripherals, turn off the CPUs entirely,
put the DRAM into self-refresh. power consumption is very low. if you've ever put a tablet on
a table and come back a month later to find that it's still on, that's because it's been suspend
99.9% of the time, and it's drawing a tiny amount the whole time.
problem with suspend is that it takes a nontrivial amount of time to enter/exit, so you can't
do it when somebody has to interact with the phone soon. on Android, suspend never happens while
the screen is on. if you ever wondered what a wakelock actually does, it prevents suspend. that's it.
@tombigel
tombigel / README.md
Last active April 8, 2024 08:33 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@mihow
mihow / load_dotenv.sh
Last active April 14, 2024 09:12
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
import appleseed as asr
mesh = asr.MeshObject("my_mesh", {})
print mesh
# Vertices
v0 = asr.Vector3f([0.0, 0.0, 0.0])
v1 = asr.Vector3f([1.0, 0.0, 0.0])
v2 = asr.Vector3f([0.0, 0.0, 1.0])