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 inherits = require('inherits'); | |
| var Game = require('crtrdg-gameloop'); | |
| var Entity = require('crtrdg-entity'); | |
| var Keyboard = require('crtrdg-keyboard'); | |
| inherits(Player, Entity); | |
| function Player(options){ | |
| this.position = { | |
| x: options.position.x, |
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 isoCountries = { | |
| 'AF' : 'Afghanistan', | |
| 'AX' : 'Aland Islands', | |
| 'AL' : 'Albania', | |
| 'DZ' : 'Algeria', | |
| 'AS' : 'American Samoa', | |
| 'AD' : 'Andorra', | |
| 'AO' : 'Angola', | |
| 'AI' : 'Anguilla', | |
| 'AQ' : 'Antarctica', |
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
| // Q sample by Jeff Cogswell | |
| /*=========== | |
| We want to call these three functions in sequence, one after the other: | |
| First we want to call one, which initiates an ajax call. Once that | |
| ajax call is complete, we want to call two. Once two's ajax call is | |
| complete, we want to call three. | |
| BUT, we don't want to just call our three functions in sequence, as this quick |
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
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@mbostock/parsing-fixed-width-data |
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
| define([ | |
| 'module/bootstrap', // this is jQuery and PubSub libs | |
| ], function (lib) { | |
| var windowMock = { | |
| resizeSet: false, // set within the fake `lib` object below | |
| createFakeWindow: function(width, height) { | |
| return { | |
| document: { | |
| documentElement: { |
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
| // Boring | |
| if (isThisAwesome) { | |
| alert('yes'); // it's not | |
| } | |
| // Awesome | |
| isThisAwesome && alert('yes'); | |
| // Also cool for guarding your code | |
| var aCoolFunction = undefined; |
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
| // Define those colors. | |
| $profiles: ( | |
| bandcamp: #4e9bac, | |
| delicious: #248cff, | |
| facebook: #3b5998, | |
| ficly: #b51c2c, | |
| flickr: #0063db, | |
| github: #4183c4, | |
| googleplus: #dd4b39, |
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
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
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
| #! /usr/bin/ruby | |
| require 'iconv' | |
| require 'roo' | |
| require 'csv' | |
| require 'json' | |
| begin | |
| ARGV.each do |file| | |
| file_basename = File.basename(file, ".xlsx") |
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
| license: gpl-3.0 |