Skip to content

Instantly share code, notes, and snippets.

View shanechin's full-sized avatar

Shane Chin shanechin

  • Columbia University
  • New York, New York
View GitHub Profile
@shanechin
shanechin / safari.md
Created December 27, 2022 05:22 — forked from RobertAKARobin/safari.md
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. As such, most of our customers are in their 60s or older. We have found that many of them are using iPads or iPhones. And they're the ones complaining to our customer support line about our site being unusable.

The problem

This is what pops up when you tap on a date field. Not bad... unless you're trying to pick your birth date, which happened to be in 1945.

@shanechin
shanechin / WebViewResizing.js
Created September 26, 2022 18:55 — forked from dbasedow/WebViewResizing.js
Resize WebView to content height in react-native
'use strict';
var React = require('react');
var ReactNative = require('react-native');
var {AppRegistry, Text, WebView, View, Dimensions} = ReactNative;
var WebViewResizing = React.createClass({
getInitialState: function () {
return {
webViewHeight: 100 // default height, can be anything
@shanechin
shanechin / app.yaml
Created November 14, 2021 03:57 — forked from alukach/app.yaml
An example Github Actions for Python + Pipenv + Postgres + Pyright
# .github/workflows/app.yaml
name: My Python Project
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
@shanechin
shanechin / index.html
Created September 6, 2021 17:25
Scratchpad
<html>
<body>
<header>header</header>
<main id="main">main</main>
<footer>footer</footer>
</body>
</html>

How Dev Bootcamp Teaches: ActiveRecord

I'm Jesse, one of the co-founders of Dev Bootcamp, and the acting curricular editor-in-chief. We get lots of questions about how Dev Bootcamp approaches teaching, what our curriculum is like, and how it differs from other schools and competitors. I thought I'd share some of that with you, starting with a brief overview of our theory of learning and then sharing our introduction to ActiveRecord.

This will be light on theory and heavy on ActiveRecord, so if you're not familiar with SQL or Ruby it might be hard to follow. Mea culpa.

Dev Bootcamp's Theory of Learning

At Dev Bootcamp, we believe that "modeling" is central to learning. The most effective students have a clear model of how the world works and are able to quickly integrate new information int

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@shanechin
shanechin / gulpfile.js
Created November 7, 2015 12:24 — forked from soin08/gulpfile.js
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@shanechin
shanechin / example-vimrc.py
Last active October 10, 2015 21:31
Some python .vimrc examples
from snake import *
import pyperclip
from sh import xdotool
import random
import string
@key_map("<leader>l")
def log():
'''
I was visited by the gains fairy this week.
There's this massive bald black dude who works out early in the morning. There's no way he isn't juicing. His tank top looks like a g string on him, he's got veins popping out everywhere. I swear this dude has visible capillaries, it's unreal. He sweats like he's in a sauna the whole time, just dripping. Carries 2 towels around. Yells on the way up when he squats. Talks to himself in the mirror shrugging. I was embarrassed to ask him for a spot the first time, just because my 2 plate bench seemed so feeble next to this monster of a man. But it was 5:30 AM, and it was him or the fat guy doing curls with kettlebells.
Anyways, so I'm only looking for 1 rep on this set (5/3/1) but hoping for 2. He doesn't touch the bar, thank god. I Get the first rep with great form, then struggle to get the second rep up. He leans over me and yells, "YOU'VE GOT 3!" I'm startled, but what the hell, he can bail me out if I fail. So I pause at the top and try 3. On my way up, he's still
@shanechin
shanechin / trypy
Last active August 29, 2015 14:19 — forked from naftaliharris/trypy
#!/bin/bash
# An enhancement to the "python" executable that automatically launches you into the python debugger on error.
#
# Use it like you would the "python" executable, for example:
# $ trypy somefile.py
# or
# $ trypy somefile.py arg1 arg2
#
# EXAMPLE: