Skip to content

Instantly share code, notes, and snippets.

View kevbook's full-sized avatar

Karan Sakhuja kevbook

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
DROP TABLE warehouse.test_main_table;
CREATE TABLE warehouse.test_main_table (
pk int PRIMARY KEY
, main_col int
, data_json JSONB
);
DROP TABLE warehouse.test_temp_table;
CREATE TABLE warehouse.test_temp_table (
pk int PRIMARY KEY
@kevbook
kevbook / repos.md
Created December 24, 2019 19:10
Github repos with NPM

Authenticate by logging in to npm

  • USERNAME is your GitHub username
  • TOKEN is your personal access token
$ npm login --registry=https://npm.pkg.github.com
> Username: USERNAME
> Password: TOKEN
> Email: PUBLIC-EMAIL-ADDRESS
var a = {
a: 1,
b: 'hello',
c: undefined,
d: 2,
e: '2',
g: null,
h: '5',
i: [1, 2, 3, 4, { a: { a: 'a' } }],
f: {
```
visit_id {Int}
knock_property_id {Int}
// From prop service
property: {
type: "sfr"
type_desc: "Single Family Residence"
year_built: 2013
size: 3349
{
"event": "invitee.created",
"time": "2018-08-27T21:49:21Z",
"payload": {
"event_type": {
"uuid": "DCDGA4N6EAE5QPPG",
"kind": "Round Robin",
"slug": "test-calendar",
"name": "Test Calendar",
"duration": 45,
atlanta: {
market: 'atlanta',
state: 'ga',
address_lat: 34.0754,
address_long: -84.2938,
radius: 120000, // In meters
mls_type: 'ga_fmls',
mls_state: 'ga'
},
charlotte: {
@kevbook
kevbook / challenge.md
Last active April 29, 2018 17:56
React challenge

React Component - Create a standard monthly calendar component using React with these minimum requirements:

  1. The monthly calendar should label the day of the month (as a number) in a fixed 6 x 7 grid (6 rows and 7 columns).
    • All the cells of the grid should have borders
  2. Each row starts with Sunday (column 0) and ends with Saturday (column 6).
    • Add a heading above each column to represent the day of the week. (eg. Sun, Mon, Tues, ...etc)
  3. Ensure that every cell in the grid displays a number.
    • For example, the currenly selected month is May 2018.
    • May 1, 2018 is a Tuesday.
    • For row 0, column 0 show April 29. For row 0, column 1 show April 30.
  4. Set a disctint style for the currently selected month so that it stands out from cells that are outside of the currently selected month.
@kevbook
kevbook / video.html
Last active April 18, 2018 15:19
knock-how-it-works
<script src="https://fast.wistia.com/embed/medias/dtycytdh15.jsonp" async></script>
<script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_dtycytdh15 videoFoam=true" style="height:100%;width:100%">&nbsp;</div>
</div></div>
// All of deal stuff on web + more detailed dom stuff, and below updated daily
@param market {String}
@param mls_type {String} (ga_fmls, etc)
@param type {String} (exmaple "sfr,condo")
@param city {String}
@param zipcode {String}
@param state {String}
@param knock_property {Boolean}