Skip to content

Instantly share code, notes, and snippets.

Joseph Michael Casey josephmcasey

Block or report user

Report or block josephmcasey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@josephmcasey
josephmcasey / anagramMapping.c
Last active Jul 15, 2018
LeetCode #760 - Find Anagram Mappings
View anagramMapping.c
int* anagramMappings(int* A, int ASize, int* B, int BSize, int* returnSize) {
int i,j=0;
returnSize=0;
int result=(int)malloc(sizeof(int)(ASize));
for(i=0;i<ASize;i++){
for(j=0;j<BSize;j++){
if((A+i)==(B+j)){
result[(*returnSize)++]=j;
@josephmcasey
josephmcasey / coderpad_template.js
Last active Jun 3, 2018
Coder Pad JavaScript Template
View coderpad_template.js
/* Imports & Setup */
const _ = require('lodash');
const Mocha = require('mocha')
const mocha = new Mocha()
const chai = require('chai')
const sinon = require('sinon')
const sChai = require('sinon-chai')
mocha.suite.emit('pre-require', this, 'solution', mocha) // Bit of a hack, sorry!
@josephmcasey
josephmcasey / .gitmessage
Last active Jul 19, 2018
LocusLabs Git Commit Message Template
View .gitmessage
# --
# 🎉 - INIT():
# 🎨 - FORMAT():
# ⚡️ - PERFORMANCE():
# 🔥 - DELETE():
# ✨ - FEAT():
# 📝 - DOCS():
# 🚀 - DEPLOY():
# 🏗 - ARCHITECTURE():
# 🔖 - VERSION():
View 3d.html
<div id="container">
<div id="cube-j" class="animate">
<!--0-->
<div id="p-2x-2">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
View Do you have any questions for us?
## My standbys:
What languages/frameworks to you usually work with?
What development tools- IDEs, Bug Trackers, Version Control, etc do you use?
What's your development methodology like (Agile, Waterfall, Scrum, Crystal, etc)?
Do you have dedicated QA personel? Even if so, do developers do some amount of their own unit testing?
## The Joel Test:
Do you use source control?
Can you make a build in one step?
Do you make daily builds?
@josephmcasey
josephmcasey / coordinates.js
Last active May 26, 2018
My obsolete solution for a PixiJS bug that uses a few mathematical concepts.
View coordinates.js
/**
* Given an origin and target, determine the x,y coordinate
* of a distance along the hypotenuse of a right triangle.
* @param {number} x0 The origin X
* @param {number} y0 The origin Y
* @param {number} x1 The target X
* @param {number} y1 The target Y
* @param {number} d0 A distance between the origin to target
* @return {[number, number]} [x,y] The desired x, y coordinate
*/
@josephmcasey
josephmcasey / privateClass.js
Last active Aug 11, 2017
Shows a basic implementation of a JavaScript class which can utilize private members while having a publicly accessible interface.
View privateClass.js
let Klass = (function () {
// To add private members using a WeakMap, check out the link below.
// https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Contributor_s_Guide/Private_Properties
function foo (params) {
// Code
}
class Klass {
You can’t perform that action at this time.