Skip to content

Instantly share code, notes, and snippets.

View meddulla's full-sized avatar

Sofia meddulla

  • Cloudflare
  • Portugal
View GitHub Profile
@meddulla
meddulla / gist:3054524
Created July 5, 2012 15:58
node.js exception handler
process.on
(
'uncaughtException',
function (err)
{
var log = err.stack;
// print note to console
console.log("SERVER CRASHED!");
@meddulla
meddulla / gist:3033257
Created July 2, 2012 13:30 — forked from ThomasBurleson/gist:1910025
Using $.post() with Promises
// an IIFE that illustrates different implementations
// of $.post() with Promises
//
// Check out jsFiddle `jQuery and Promises with UI animation`
// - demonstrates $.Deferrred() and custom $.when()
// - @ http://jsfiddle.net/ThomasBurleson/RTLr6/179/
//
var onSubmitFeedback = (function () {
var target = $("#container").append("<div class='spinner'>");
@meddulla
meddulla / ModelTestCase.php
Created February 3, 2012 12:15 — forked from wowo/ModelTestCase.php
Model Test Case, which loads fixtures and builds database before each test
<?php
require_once(__DIR__ . "/../../../../app/AppKernel.php");
class ModelTestCase extends \PHPUnit_Framework_TestCase
{
protected $_application;
public function setUp()
{