Skip to content

Instantly share code, notes, and snippets.

View nicolechung's full-sized avatar

nicole chung nicolechung

View GitHub Profile
@nicolechung
nicolechung / index.html
Last active January 11, 2019 21:37
Tic Tac Toe (HTML, SASS, ES6 Javascript)
<html>
<body>
<h2>Click on a square to start</h2>
<div id="container">
<div id="game-box">
<div data-box="1" class="box"> </div>
<div data-box="2" class="box"> </div>
<div data-box="3" class="box"> </div>
<div data-box="4" class="box"> </div>
import React from 'react'
module.exports = () => <svg />
{
"moduleNameMapper": {
"\\.(scss)$": "identity-obj-proxy",
"\\.(css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
},
"setupTestFrameworkScriptFile": "./jestSetup.js"
}
const localStorageMock = (function () {
let store = {}
return {
getItem: (key) => store[key] || null,
setItem: (key, value) => {
store[key] = value.toString()
},
removeItem: (key) => delete store[key],
clear: () => { store = {} }
module.exports = 'test-file-stub'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.8.0/ember.js"></script>
<style id="jsbin-css">
@nicolechung
nicolechung / index.html
Created November 4, 2014 12:07
Ember Starter Kit // source http://emberjs.jsbin.com/yoyomo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.8.0/ember.js"></script>
<style id="jsbin-css">
@nicolechung
nicolechung / AIPath2D
Created October 7, 2014 02:54
now it follows the path (before it wasn't) but need to keep rotation on the z-axis
//#define ASTARDEBUG
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Pathfinding;
using Pathfinding.RVO;
/** AI for following paths.
* This AI is the default movement script which comes with the A* Pathfinding Project.
* It is in no way required by the rest of the system, so feel free to write your own. But I hope this script will make it easier
@nicolechung
nicolechung / SassMeister-input.scss
Created August 18, 2014 17:45
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
/* Bad: Using hex code instead of a colour variable */
.foo {
background-color: #f4f4f4;
}
/* Good: using a color variable */
@nicolechung
nicolechung / SassMeister-input.scss
Created August 18, 2014 17:42
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
/* Good nesting: only three levels deep */
.foo {
.bar {
.baz {
color: red;
}