Skip to content

Instantly share code, notes, and snippets.

View iCodeForBananas's full-sized avatar

Michael Calkins iCodeForBananas

  • AWS
  • Seattle, WA
View GitHub Profile
7 AM] And_re: https://github.com/gamestdio/colyseus.js
GitHub
gamestdio/colyseus.js
colyseus.js - Multiplayer Game Client for the Browser
[10:47 AM] And_re: https://github.com/kawanet/msgpack-lite
GitHub
kawanet/msgpack-lite
msgpack-lite - Fast Pure JavaScript MessagePack Encoder and Decoder / msgpack.org[JavaScript]
using UnityEngine;
using System.Collections;
public class characterControls : MonoBehaviour
{
public float speed = 10.0f;
public float crouchMultiplier = -2f;
public float sprintMultiplier = 1.5f;
[HideInInspector]
public float curSpeed = 0;
//
//
// Ladybug House custom scripts
//
//
(function ($) {
$(function () {
//Give Today Popup:
<div class='givebig-overlay'></div>
<div class='givebig-popup'>
<span class='givebig-close'>X</span>
<a href="https://givebig.seattlefoundation.org/npo/ladybug-house"><img src="http://static1.squarespace.com/static/5399c64ce4b0ce64b1989088/t/57282ef860b5e9e309385d21/1462251265930/GiveBIG%2BLBH_webmockup-02.jpg"/>
</a>
</div>
JavaScript Wizard:
1. babel-plugins
2. webpack options
3. npm packages
Outputs:
- package.json
- webpack.config.js
- webpack/base.js
- webpack/prod.js
import GameConsts from 'lib/GameConsts'
export default function() {
const state = this.game.store.getState()
const scaleFactor = state.player.quality <= GameConsts.MAX_QUALITY_SIZE
? state.player.quality
: GameConsts.MAX_QUALITY_SIZE
const innerWidth = window.innerWidth
const innerHeight = window.innerHeight
const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ASSET_PATH = 'resources/assets'
const APP_FILE_PATH = './resources/assets/js/app.js'
const PUBLIC_PATH = 'public'
module.exports = function() {
return {
entry: APP_FILE_PATH,
output: {
<!-- comment the linebreak between these two elements because science
--><div id="content" class="main-content" data-content-field="main-content" data-collection-id="5579cdffe4b0517ad3c4beb1" data-edit-main-image="Banner">
<div class="sqs-layout sqs-grid-12 columns-12" data-type="page" data-updated-on="1458664251023" id="page-5579cdffe4b0517ad3c4beb1"><div class="row sqs-row"><div class="col sqs-col-12 span-12"><div class="sqs-block html-block sqs-block-html" data-block-type="2" id="block-yui_3_17_2_2_1434056950114_9976"><div class="sqs-block-content"><p class="text-align-center"><a target="_blank" href="http://www.ehospice.com/internationalchildrens/ArticleView/tabid/10670/ArticleId/18357/language/en-GB/View.aspx">ehospice</a> | HOT 103.7 Radio |&nbsp;<a target="_blank" href="http://www.king5.com/story/news/local/2016/01/05/children-hospice-ladybug-house-seattle/78333440/">KING 5 News</a> | <a href="http://www.seattletimes.com/seattle-news/fast-pitch-helps-good-ideas-ventures-get-beyond-firs
// scripts.js
const SearchToggleButton = function() {
this.searchInputContainer = document.getElementById('search-input-container')
this.browsePartsContainer = document.getElementById('browse-parts-container')
this.handleClick = function() {
this.searchInputContainer.style.display = 'block'
this.browsePartsContainer.style.display = 'none'
}
@iCodeForBananas
iCodeForBananas / app.js
Last active November 30, 2016 18:29
VanillaJS App Structure
<!-- Use a function to minify and cache this code on load -->
<script>
window.app = {
state: {
search: {
isSearchOpen: false,
},
},
actions: {
search: {