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 / opentsdb.conf.test
Created August 29, 2018 02:04
Opentsdb 2.3.1 Config
tsd.network.port = 4242
tsd.core.auto_create_metrics = true
tsd.core.meta.enable_realtime_ts = true
tsd.core.meta.enable_realtime_uid = true
tsd.core.meta.enable_tsuid_tracking = true
tsd.http.request.enable_chunked = true
tsd.http.request.max_chunk = 131072
tsd.storage.fix_duplicates = true
tsd.storage.enable_compaction = false
tsd.storage.max_tags = 12
@quekshuy
quekshuy / console.replacement.js
Created November 5, 2013 07:08
Ensures that console.log doesn't fuck up the show when it doesn't exist.
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
{% for product in product_list %}
{% if product.position == 0 %}
<tr class="odd">
{% else %}
<tr class="even">
{% endif %}
<td class="chChildren"><input type="checkbox" name="checkbox" value="{{ product.id }}" class="styled" /></td>
<td><img height="100" width="100" src="{{ product.image }}" class="img-rounded marginR10"></td>
<td>{{ product.name }}</td>
<td>{{ product.product_type }}</td>
@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">
var cc = $('form').clone();
cc.find('input[type=submit]')
.attr('onclick', null)
.on('click', function() { alert('Hey!'); });
$('#some-element').before(cc);
@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.

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 / 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)
@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: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.