Skip to content

Instantly share code, notes, and snippets.

View quekshuy's full-sized avatar
💭
Growing up 🌱

Shu Yang Quek quekshuy

💭
Growing up 🌱
View GitHub Profile
@quekshuy
quekshuy / gist:3610219
Created September 3, 2012 15:54
[Reading] iOS 5 Programming - Pushing the Limits

While it may not be the best of times to start reading a book on iOS programming, I have no idea when I can really run through this book (perhaps only after I've gotten myself a Kindle-like reading device. But still, something to consider.

@quekshuy
quekshuy / gist:3610838
Created September 3, 2012 16:59
There are only two hard things in computer science...

OH:

There are only two hard things in computer science: cache invalidation, naming things and off-by-one errors.

LOL.

@quekshuy
quekshuy / gist:4243901
Created December 9, 2012 08:41
[Advocado] Redesign Notes (for Documentation)

Here are the exact steps on how the implementation would go as of now.

##On the Product Page

  1. Product page loads. Also loads Advocado JS.
  2. Advocado JS extracts information from the page or from parameters to decide what to render.
  3. Advocado JS calls platform side API or advocado backend for data to populate templates (mustache.js).
  4. Advocado JS downloads, renders and inserts the overlays (HTML/CSS) (via templates) into the page
  5. Wait for user interaction
  6. User clicks and proceeds to choose one of the sharing channels, for the case of this scenario, Facebook
@quekshuy
quekshuy / gist:4248801
Created December 10, 2012 06:22
Advocado JS Widgets documentation

##AdvocShareWidget

###Events

  • shared

The user has successfully shared the product.

  • sharing

A sharing popup has been launched and the user is currently sharing.

@quekshuy
quekshuy / analytics.md
Created December 11, 2012 04:03
Advocado JS Analytics Design

##Inserting Javascript

We propose a method to load our scripts/CSS using HeadJS. We do the insertion of the HeadJS asset loader via a simple script then we use it to load the rest of our modules (we have to do a minimum of 1 script insertion. which adds some certainty to it.)

Script insertion of HeadJS (not fully tested across all browsers):

var _hT=document.getElementsByTagName('head')[0];var _a = document.createElement('script'); _a.src='//cdnjs.cloudflare.com/ajax/libs/headjs/0.99/head.load.min.js'; _a.type='text/javascript';_a.async=true;var s=document.getElementsByTagName('script'); if(s.length==0){ _hT.appendChild(_a); } else { s[0].parentNode.insertBefore(_a, s); }
@quekshuy
quekshuy / gist:4274711
Created December 13, 2012 07:17
API calls for displaying referral overlay

Required details

Listed inside the document is a set of stuff that we will need in order to render the referral overlay correctly.

  • Owner_sub_name (Parent subscriber's details, such as first name and photo)
  • list_products_ids_campaign (IDs of other products sharing the same campaign)
  • picture_ppl_sharing/no_ppl_sharing (details of other people sharing this particular product)
  • landing_template_msg (template message for a referral for this particular campaign)

I'm going to constantly come back to this entry. It's really a list of stuff I thought and said that I believe to be flawed or just wrong. It serves as a constant reminder that the world though small, is still more significant in the sum of its parts than my often too-big-for-my-britches mindset.

1. "If you're not updating Facebook, how do I find out what you've been up to?"

Call. Arrange for a meet up. Get them out for a cup of coffee. That's what friends do.

2. "Your business NEEDS to scale out of Singapore"

Background: Singapore is a really small country, with a population of less than 6mil. If you're working in tech and B2B, it's more often than not the market is too small to support a handful of competitors, so people starting (hyper-)local businesses often have to think about how to expand beyond the country's shores. If you're considering B2C, for highly disruptive products, you have a number of really conservative customers who would not be willing to fork out their hard-earned money for s

@quekshuy
quekshuy / this.is.scary.complex.md
Last active December 10, 2015 21:18
This is scary [Magento Admin Console Layouts]

I'm going to be honest.

I saw this in the Magento documentation for extension development:

Crazy complex looking layout definition

... and i got kind of scared.

But I guess now we just have to dive head in to figure it out, because trying to use my own templates and importing stuff is like trying bend over backwards to kiss my heels - too inconvenient and i've given up trying to find a way.

var cc = $('form').clone();
cc.find('input[type=submit]')
.attr('onclick', null)
.on('click', function() { alert('Hey!'); });
$('#some-element').before(cc);
@quekshuy
quekshuy / gist:5361320
Last active December 16, 2015 02:19 — forked from anonymous/gist:5361287
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1.0"> <!-- So that mobile webkit will display zoomed in -->
<meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS -->
<title>Antwort - responsive Email Layout</title>
<style type="text/css">