Skip to content

Instantly share code, notes, and snippets.

@vcardillo
vcardillo / war_card_game_simulation.php
Last active May 24, 2024 03:44
Something I wrote for an interview once
<?php
class Deck {
private $deck = [];
/**
@vcardillo
vcardillo / Angular Service Outside Invocation Example.js
Last active August 29, 2015 14:02
Outside Invocation of an Angular Service, example
// This is particularly handy if you need to call a service's method from outside of Angular, for whatever reason.
// Have your app on global namespace:
var hz = {};
hz.app = angular.module('hz', ...
// Ok, so you make a service and give it some methods:
@vcardillo
vcardillo / closures.html
Created May 21, 2014 22:09
JavaScript Concept Tests
<html>
<head>
<script type="text/javascript">
// ** Closure reference test
var rwaf = {};
rwaf.login = function() {