This file contains 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
<script> | |
var direction = 1; | |
AFRAME.registerComponent('auto-camera', { | |
tick: function () { | |
var currentPosition = this.el.object3D.position; | |
if (currentPosition.z < -2) { | |
direction = 1; | |
} else if (currentPosition.z > 0) { | |
direction = -1; | |
} |
This file contains 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
<script src="https://cdn.rawgit.com/matthewbryancurtis/aframe-star-system-component/db4f1030/index.js"></script> | |
<a-scene> | |
<a-sky color="#222"></a-sky> | |
<a-entity star-system></a-entity> | |
</a-scene> |
This file contains 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
<a-assets> | |
<a-asset-item id="mtl" src="https://cdn.glitch.com/787f26e4-ded1-4eaf-ba99-e2a5c1ffda59%2Facesjustforroomshow.mtl?1525708212104"></a-asset-item> | |
<a-asset-item id="obj" src="https://cdn.glitch.com/787f26e4-ded1-4eaf-ba99-e2a5c1ffda59%2Facesjustforroomshow.obj?1525708229479"></a-asset-item> | |
</a-assets> | |
<a-entity obj-model="obj: #obj; mtl: #mtl;" position="-1 -1 -1" scale="1 1 1" rotation="0 180 0" shadow></a-entity> |
This file contains 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
<a-entity position="0 1 0"> | |
<a-camera></a-camera> | |
</a-entity> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello, WebVR! - A-Frame</title> | |
<meta name="description" content="Hello, WebVR! - A-Frame"> | |
<script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script> | |
</head> | |
<body> | |
<a-scene> | |
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box> |
This file contains 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
<?php | |
function tokenize($string) | |
{ | |
$string = preg_replace("/ +/", " ", $string); | |
return explode(" ", strtolower($string)); | |
} | |
function train($dataset, $text, $class) | |
{ | |
$tokens=tokenize($text); |
This file contains 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
for i in `cat urls.txt`; do curl -s -o /dev/null -w "%{http_code} " $i; echo $i; done |
This file contains 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
<?php | |
backup_tables('','','',''); | |
/* backup the db OR just a table */ | |
function backup_tables($host,$user,$pass,$database,$tables = '*') | |
{ | |
$link = mysql_connect($host,$user,$pass); | |
mysql_select_db($database,$link); | |
This file contains 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
//http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions/834355#834355 | |
//Note: Be careful with empty strings, you might want a different behaviour | |
function startsWith($haystack, $needle) | |
{ | |
$length = strlen($needle); | |
return (substr($haystack, 0, $length) === $needle); | |
} | |
function endsWith($haystack, $needle) |
This file contains 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
<?php | |
class Paypal { | |
/** | |
* Last error message(s) | |
* @var array | |
*/ | |
protected $_errors = array(); | |
/** | |
* API Credentials |
NewerOlder