Skip to content

Instantly share code, notes, and snippets.

View jwulf's full-sized avatar
:octocat:
Coding on Halmak

Josh Wulf jwulf

:octocat:
Coding on Halmak
View GitHub Profile

Coming soon!

We'll email you as soon as it's ready.

In the meantime, take a look around in here.

@jwulf
jwulf / jump
Created September 23, 2019 23:19
const magik = magikcraft.io;
function main(power = 100) {
magik.exsultus(power);
}
version: '2'
services:
db:
image: oscarfonts/h2
container_name: zeebe_db
ports:
- "1521:1521"
- "81:81"
networks:
{
"compilerOptions": {
/* Basic Options */
"target": "es2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
@jwulf
jwulf / empty.js
Created April 7, 2018 03:10
How to test if a variable is empty - including an empty object or empty array
function empty(data)
{
if(typeof(data) == 'number' || typeof(data) == 'boolean')
{
return false;
}
if(typeof(data) == 'undefined' || data === null)
{
return true;
}
@jwulf
jwulf / createMathOperation.js
Created March 6, 2018 22:29
Lodash's createMathOperation in ES6
import baseToNumber from './baseToNumber.js'
import baseToString from './baseToString.js'
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @param {number} [defaultValue] The value used for `undefined` arguments.
* @returns {Function} Returns the new mathematical operation function.
@jwulf
jwulf / add.js
Created March 6, 2018 22:23
Lodash add in ES5
var createMathOperation = require('./_createMathOperation');
var add = createMathOperation(function(augend, addend) {
return augend + addend;
}, 0);
module.exports = add;
@jwulf
jwulf / add.js
Created March 6, 2018 22:22
Lodash add.js in ES6
import createMathOperation from './.internal/createMathOperation.js'
/**
* Adds two numbers.
*
* @since 3.4.0
* @category Math
* @param {number} augend The first number in an addition.
* @param {number} addend The second number in an addition.
* @returns {number} Returns the total.
* @example
const magik = magikcraft.io;
function zombie(target: string){
const EntityType = magik.type("entity.EntityType");
const aZombie = EntityType['ZOMBIE'];
const where = magik.aspecto();
const world = where.getWorld();
const zombie = world.spawnEntity(where, aZombie);
@jwulf
jwulf / write.ts
Last active December 19, 2017 12:08
Save this as a spell in Magikcraft - play.magikcraft.io
const magik = magikcraft.io;
/*
Fonts are bitmaps.
Each number is the decimal equivalent of the binary
bitmap of the line, for example: 00011000 = 24
Here is a bitmapped 'A':
00011000 = 24
00111100 = 60
00100100 = 36