Skip to content

Instantly share code, notes, and snippets.

View iCodeForBananas's full-sized avatar

Michael Calkins iCodeForBananas

View GitHub Profile
const questions = [
{
question: 'Select the ReactDOM method that renders a React component',
method: 'render',
description: 'Render a React element into the DOM in the supplied container and return a reference to the component (or returns null for stateless components).',
codeExample: `
ReactDOM.render(
element,
container,
[callback]
{"version":1.02,"files":[{"file":".DS_Store","content":{"type":"Buffer","data":[0,0,0,1,66,117,100,49,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,1,0,0,16,0,0,97,0,103,0,101,0,115,118,83,114,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0,112,0,97,0,99,0,107,0,97,0,103,0,101,0,115,118,83,114,110,108,111,110,103,0,0,0,1,0,0,0,8,0,114,0,101,0,99,0,111,0,118,0,101,0,114,0,121,118,83,114,110,108,111,110,103,0,0,0,1,0,0,0,7,0,115,0,116,0,111,0,114,0,97,0,103,0,101,118,83,114,110,108,111,110,103,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
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