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
| gulp = require 'gulp' | |
| babel = require 'gulp-babel' | |
| sourcemaps = require 'gulp-sourcemaps' | |
| concat = require 'gulp-concat' | |
| uglify = require 'gulp-uglify' | |
| sass = require 'gulp-sass' | |
| minCss = require 'gulp-minify-css' | |
| prefix = require 'gulp-autoprefixer' |
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
| class Derp | |
| { | |
| public: | |
| Derp() : number_(0) {} | |
| private: | |
| int number_; | |
| } | |
| class Derp |
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
| This is what i have now | |
| =========== | |
| FirstEntry | |
| SecondEntry | |
| ThirdEntry | |
| Desired result | |
| ============== | |
| // Easy way to convert the above list to the following |
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
| MyObjectThingy.prototype.someFunction = function () { | |
| var that = this; | |
| OtherObject.doSomethingWithACallback(123, function () { | |
| that.done(); | |
| }); | |
| }; | |
| MyObjectThingy.prototype.someFunction = function () { | |
| OtherObject.doSomethingWithACallback(123, function () { |
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
| var e = document.createElement("canvas") | |
| var c = e.getContext("2d"); | |
| e.width = 1 | |
| e.height = 1 | |
| var d = c.getImageData(0, 0, 1, 1); | |
| d.data[0] = 0; // R |
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
| var createGame = require('voxel-engine') | |
| function sphereWorld(x, y, z) { | |
| // return the index of the material you want to show up | |
| // 0 is air | |
| //if (x*x + y*y + z*z > 15*15) return 0 | |
| if (y != 0 || x > 10 || x < -10 || z > 10 || z < -10) return 0 | |
| return 3 | |
| } |
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
| <?php | |
| require_once 'app/Mage.php'; | |
| // Set some debugging flags | |
| Varien_Profiler::enable(); | |
| Mage::setIsDeveloperMode(true); | |
| ini_set('display_errors', 1); | |
| // Initialize Magento |