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
Object.byString = function(o, s) { | |
s = s.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties | |
s = s.replace(/^\./, ''); // strip a leading dot | |
var a = s.split('.'); | |
for (var i = 0, n = a.length; i < n; ++i) { | |
var k = a[i]; | |
if (k in o) { | |
o = o[k]; | |
} else { | |
return; |
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
app.set('json spaces', 4); |
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
./RunOSX.command --path ./cachedata/ --size 10000000000 |
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
using UnityEngine; | |
using System.Collections; | |
//demand an adio source be placed on this component for use with the audio clip | |
[RequireComponent(typeof(AudioSource))] | |
public class FlickThrowTouch : MonoBehaviour | |
{ | |
public Vector2 touchStart; | |
public Vector2 touchEnd; | |
public int flickTime = 5; |
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
void Start () { | |
float min = float.MaxValue; | |
float max = float.MinValue; | |
const float ratio = 1.5f; | |
for (int x = 0; x < 100; x++) | |
{ | |
for (int y = 0; y < 100; y++) |
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
Copyright (C) 2012 Justin Poliey <justin.d.poliey@gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WIT |
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
sudo npm install -g gulp | |
gulp -v | |
npm install --save-dev gulp | |
npm install gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename --save-dev |
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
.c{ | |
... | |
overflow: hidden; | |
} | |
This will force the container to respect the height of all elements within it, regardless of floating elements. | |
http://jsfiddle.net/gtdfY/3/ | |
UPDATE | |
Recently, I was working on a project that required this trick, but needed to allow overflow to show, so instead, you can use a pseudo-element to clear your floats, effectively achieving the same effect while allowing overflow on all elements. |
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
I just move the camera holder object with this | |
//CAMERA MOVEMENT CONTROLS | |
float MoveVertical = Input.GetAxis("Vertical") * VerticalCameraSpeed * Time.deltaTime; | |
float MoveHorizontal = Input.GetAxis("Horizontal") * HorizontalCameraSpeed * Time.deltaTime; | |
CameraHolder.transform.Translate (Vector3.forward * MoveVertical); | |
CameraHolder.transform.Translate (Vector3.right * MoveHorizontal); | |
float Rotation = Input.GetAxis("Rotation"); | |
if (Input.GetAxis ("Rotation") < 0 || Input.GetAxis ("Rotation") > 0) | |
{ | |
CameraHolder.transform.Rotate(Vector3.up, Rotation * CameraRotateSpeed * Time.deltaTime,Space.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
<div> | |
<h1>Tweetbox</h1> | |
<form id="my-tweetbox"> | |
<p><textarea name="tweet">Write your tweet...</textarea></p> | |
<p><input type="submit" name="submit" value="Tweet!" /></p> | |
</form> | |
</div> | |
<div> | |
<h1>County Tweetbox</h1> |