Skip to content

Instantly share code, notes, and snippets.

View kovid-r's full-sized avatar
🏠
Working from home

Kovid Rathee kovid-r

🏠
Working from home
View GitHub Profile
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,
@kovid-r
kovid-r / get-medium-stats.js
Created January 9, 2022 13:36 — forked from igeligel/get-medium-stats.js
medium-get-totals
const totalTypes = {
VIEWS: 2,
READS: 3,
FANS: 5
};
const getTotal = tableColumn =>
[
...document.querySelectorAll(
`td:nth-child(${tableColumn}) > span.sortableTable-number`
@kovid-r
kovid-r / aws_vnc_mac.sh
Last active December 3, 2020 09:15 — forked from sebsto/gist:6af5bf3acaf25c00dd938c3bbe722cc1
Start VNCServer on Mac1 EC2 Instance
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
ssh -i <your private key.pem> ec2-user@<your public ip address>
# On the Mac
# Set a password for ec2-user
sudo passwd ec2-user
# Enable VNC Server