Skip to content

Instantly share code, notes, and snippets.

Sher Minn Chong piratefsh

Block or report user

Report or block piratefsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am piratefsh on github.
  • I am sherminn ( on keybase.
  • I have a public key ASBdx7Nt-xsUJlfWNHasXIxZFbEvSbXL5w0W3yIqjGY_jwo

To claim this, I am signing this object:

View multi.html
<!DOCTYPE html>
<title>Interactive Features</title>
<ul id="my-list">
<li id="1">item1</li>
<li id="2">item2</li>
# quick and dirty scraper to get images from
# requires requests module
import requests
import os
def get_image(url, filename):
r = requests.get(url)
if r.status_code == 200:

Lessons from deleting code

Deleting unused code is part of a healthy codebase. Every now and then, a feature gets decommissioned and an engineer is tasked with removing it. Sometimes I'm that engineer. It seems like a trivial thing to write about, but I was pleasantly surprised by how non-straightforward it can be, especially if you're doing it for the first time. There're lots of learning points, especially on how code organization really matters when it comes to maintainability.

Decommissioning a feature is more than just turning it off. It also means hunting down all the parts of code that is no longer needed. And that can be pretty tricky.

It goes without saying that this is by no means the only way to go about doing it. It also really depends on how your codebase is organized. Hopefully this will give you some idea on where to start and things to look out for when you're doing code cleanup.

For some context, our web client at Viki is on the following stack:

  • Frameworks/Libraries: Ruby on Rails
View JSConf IS notes
Cartoon guide to React performance
- shouldComponentUpdate() -- reduces render update given similar state
- setState at lower levels in tree
- state immutability
Reactive Animation
- david khourshd
- RXCSS (dynamic variables in css)
View ESLint setup for Sublime Text

##Sublime linter setup Displays warnings and errors from ESLint. You need eslint installed. See readme of for eslint installation instructions

  1. With Package Manager, install SublimeLinter and SublimeLinter-contrib-eslint
  2. Cmd+Shift+P should now have a SublimeLinter: Lint This View option
  3. Running that should lint your file. It should also run the linter on file load and save (configurable on SublimeLinter settings)

##Sublime formatter setup Autoformats your files according to ESLint --fix option

### batch convert image with imagemagick, preserve filename
for i in *.png; do convert "$i" -resize 400 "retina/${i%.*}@2x.png"; done

JavaScript, the weird parts

link to notes

about Sher Minn

  • front-end web engineer
  • funemployed, but joining in a week
  • recently spent 3 months in NYC at the Recurse Center
    • retreat for programmers
    • where people go to be better at what they do

JavaScript, the weird parts

JavaScript can be mysterious and weird, let's just all admit that. In this talk, we'll explore all the wonderful obscure, weird bits of JavaScript, and how to befriend them so they don't bite you in the ass (if they haven't already). For example we'll explore things like:

Why on earth does this work:


function foo(){
View seawave.js
function onGLC(glc) {
// glc.size(400, 400);
// glc.setFPS(20);
var list = glc.renderList,
width = glc.w,
height = glc.h,
You can’t perform that action at this time.