Skip to content

Instantly share code, notes, and snippets.

View martywallace's full-sized avatar

Marty Wallace martywallace

View GitHub Profile
pages:
script:
- mkdir public
- cp -a templates/* public/
artifacts:
paths:
- public
before_script:
- echo "@SCOPE:registry=https://gitlab.com/api/v4/packages/npm/" > ~/.npmrc
- echo "//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> ~/.npmrc
- echo "//gitlab.com/api/v4/projects/:_authToken=${CI_JOB_TOKEN}" >> ~/.npmrc
image: node:16
variables:
SCOPE: MY-SCOPE
stages:
- build
- test
- publish
@martywallace
martywallace / package.json
Created July 8, 2021 23:59
Example package.json
{
"name": "@my-gitlab-username/my-project-name",
"version": "0.1.0",
"scripts": {
"build": "rm -rf dist && tsc"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"devDependencies": {
"typescript": "^4.3.5"
package {
public class Test {
public function Test() {
trace('Working!');
}
}
}
let process = {
step() {
// Do some stuff.
// ...
setTimeout(this.step.bind(this), 1000);
}
};
process.step();
public function contains(relationship:ItemRelationship):Boolean {
var ids:Vector.<int> = new <int>[];
for each (var item:Item in relationship.items) {
ids.push(item.id);
}
return find(ids) !== null;
}
function userEntry(callback) {
callback && callback(prompt("Please enter your name here."));
}
userEntry(function(name) {
firstUserEntry = name;
console.log(firstUserEntry);
});
@martywallace
martywallace / gist:5bb820800a258bf22669
Last active August 29, 2015 14:19
Collision detection
for each (var a:Asteroid in asteroids)
{
for each (var b:Asteroid in asteroids)
{
if (a !== b && a.hitTestObject(b))
{
// Handle collision.
// ...
}
}