Skip to content

Instantly share code, notes, and snippets.

View ymichael's full-sized avatar

Michael Yong ymichael

View GitHub Profile
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/*
* AUTOGENERATED FROM GENERATE-SERVICE-WORKER
*/
const $VERSION = '26f8b6b6d92f0e7d7b7dc5ccae53d58f';
const $DEBUG = false;
const $Cache = {
"precache": [
"https://s.pinimg.com/webapp/js/entryChunk-react-common-5c5fb1fe655d0e4956c2.js",
"https://s.pinimg.com/webapp/js/vendor-react-6f23018b1ba21a553ff6.js",
@ymichael
ymichael / output.js
Created February 28, 2017 04:40
$ eggroll bundle --resolve --root lib_es5/ lib_es5/index.js | uglifyjs -mceb
!function() {
var o;
o = function() {
console.log("this is a cool function called fun1!");
};
var n;
n = function() {
console.log("this is a cool function called fun2!");
};
var c;
@ymichael
ymichael / README
Last active November 16, 2015 03:56
IVLE Webcast mp4 download links
1. Create a bookmark with url the contents of webcast-bookmarklet.
2. Click on the bookmark when you're on the ivle webcast page.
@ymichael
ymichael / jediscript_styleguide.md
Created August 22, 2012 17:28
JediScript Style Guide Draft

JediScript Style Guide

Indentation

  • Use a four space indent.

Semicolons

  • Terminate all statements with a semicolon ;

Curly Braces

  • Curly braces should open on the same line and close on a new line
@ymichael
ymichael / app.js
Created May 4, 2012 04:13 — forked from dbainbridge/app.js
How to use socket.io with Express 3
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http');
var app = express();
var server = app.listen(3000);
@ymichael
ymichael / gist:2301402
Created April 4, 2012 14:12
ivle module endpoint
https://ivle.nus.edu.sg/api/Lapi.svc/Modules?APIKey={{ api key }}&AuthToken={{ auth token }}&Duration=0&IncludeAllInfo=false&output=json
@ymichael
ymichael / snippet.js
Created April 3, 2012 16:39 — forked from christopherdebeer/snippet.js
Node.js Express - Mobile detection
app.get('/', function(req, res){
var ua = req.header('user-agent');
if(/mobile/i.test(ua)) {
res.render('mobile.html');
} else {
res.render('desktop.html');
}
});
@ymichael
ymichael / gist:2260134
Created March 31, 2012 06:53
app build
({
baseUrl: ".",
name: "main",
out: "../../build/js/main.js",
paths: {
'jquery': "empty:",
'underscore': "libs/underscore",
'backbone': "libs/backbone",
'ich': "libs/icanhazamd",
'ivle': "libs/ivle",
require.config({
paths: {
// i use jquery cdn to speed up my page load
'jquery': "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min",
'underscore': "libs/underscore",
'backbone': "libs/backbone",
// other scripts
'ich': "libs/icanhazamd",