As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
function uuid() { | |
var uuid = "", i, random; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i == 8 || i == 12 || i == 16 || i == 20) { | |
uuid += "-" | |
} | |
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); | |
} |
ig.module( | |
'game.entities.player' | |
) | |
.requires( | |
'impact.entity' | |
) | |
.defines(function() { | |
EntityPlayer = ig.Entity.extend({ |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ --> | |
<style type="text/css"> | |
.no-fouc {display: none;} | |
</style> | |
<script type="text/javascript"> | |
document.documentElement.className = 'no-fouc'; | |
// add to document ready: $('.no-fouc').removeClass('no-fouc'); | |
</script> |
#Symlink a folder from a git submodule for use in a project
I recently came across a need to try this out on a project i was working on. So here's how to do it, incase anyone else finds themselves in the same situation.
##Set up your submodule in a seperate directory.
Run this command from your project root.
git submodule add http://example.com/repo.git ./submodules/repo
// model | |
function Model () { | |
this._state = {} | |
return this | |
} | |
Model.prototype.get = function (key) { | |
return this._state[key] | |
} |
ig.module( | |
'game.entities.door' | |
) | |
.requires( | |
'plugins.twopointfive.entity' | |
) | |
.defines(function(){ | |
EntityDoor = tpf.Entity.extend({ | |
type: ig.Entity.TYPE.NONE, |
{ | |
"keys": ["tab"], | |
"command": "expand_abbreviation_by_tab", | |
// put comma-separated syntax selectors for which | |
// you want to expandEmmet abbreviations into "operand" key | |
// instead of SCOPE_SELECTOR. | |
// Examples: source.js, text.html - source | |
"context": [ | |
{ |
Make Sandstorm and other web server coexist in the same port while keeping HTTPS encryption.
The purpose of this tutorial is to set up SNI Proxy so it’s possible to use Sandstorm verified SSL encryption while coexisting with another web server that also uses SSL.
The main reason is to allow other users to connect with your Sandstorm instance in the standard HTTPS port (443) and keep using that port also for any other web apps.