Status | Title | Tags |
---|---|---|
✔ | Modernizing Soompi - The First Step, Refreshing the Soompi user experience for 2018 | Medium, UI, UX |
✔ | Modernising Soompi - Part 1, Upgrading a K-pop legend for the new generation | Medium, Introduction |
✔ | Modernising Soompi - Part 2, Updating the back-end by deconstructing a monolith | Medium, Backend |
✔ | Modernizing Soompi - Part 3, Establishing a new standard for front-end services | Medium, Frontend |
✔ | SingaporeJS Meetup: Modernising a 20 Year Legacy | Frontend, Video |
✔ | [NUS Hackers: From a monolith, rewriting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Loadable from 'react-loadable' | |
import LoadingComponent from 'scripts/components/LoadingComponent' | |
class ExamplePage extends React.Component { | |
static Component = Loadable({ | |
loader: () => import(/* webpackChunkName: "ExamplePage" */ 'example'), | |
loading: LoadingComponent, // Lightweight LoadingComponent to use whenever this component is first loaded | |
modules: ['ExamplePage'] // Modules to load should be accessible from loader property above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Navbar from 'scripts/components/Navbar' | |
import React, { Component } from 'react' | |
import { withRouter } from 'react-router' | |
import { renderRoutes } from 'react-router-config' | |
import { routes } from 'scripts/routes' | |
class BaseSPA extends Component { | |
constructor(props) { | |
super(props) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/x.x.x/jquery.min.js" defer></script> | |
<script> | |
function initFunc(){ | |
// Do something here for page initialisation | |
// For example, loading frontend SPA | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import ( | |
httptransport "github.com/go-kit/kit/transport/http" | |
grpctransport "github.com/go-kit/kit/transport/grpc" | |
) | |
func makeCommonEndpoint() endpoint.Endpoint { | |
return func(ctx context.Context, request interface{}) (interface{}, error) { | |
// Some Logic Here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function alert(msg){ | |
var ui = DocumentApp.getUi(); | |
ui.alert(msg, ui.ButtonSet.OK); | |
} | |
function myFunction() { | |
alert('Hello World!'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function factorial($endAt, $startAt: 1, $currentVal: 1) { | |
$accVal: $currentVal; | |
@for $i from $startAt + 1 to $endAt + 1 { | |
$accVal: $i * $accVal; | |
} | |
@return $accVal; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'factorial'; | |
$PI: 3.14159265358979323846; | |
$TWO_PI: $PI * 2; | |
$HALF_PI: $PI / 2; | |
$QUARTER_PI: $PI / 4; | |
$SIN_ITERATION: 10; | |
@function sin($rad) { | |
// Ensure value is between 0 to TWO_PI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'sin'; | |
@function cos($rad) { | |
@return sin($rad + $HALF_PI); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'true'; | |
@import 'factorial'; | |
@include describe('.factorial [function]') { | |
@include it('should return value for 10! as 3628800') { | |
@include assert-equal(factorial(10), 3628800); | |
} | |
} | |
@include report; |