Skip to content

Instantly share code, notes, and snippets.

@curry36
curry36 / airpal
Created April 29, 2015 07:52
Airpal-Gradle build error
./gradlew clean shadowJar -Dairpal.useLocalNode
:cleanAssets UP-TO-DATE
:clean UP-TO-DATE
:nodeSetup SKIPPED
:installAssets
:buildAssets
util.js:634
ctor.prototype = Object.create(superCtor.prototype, {
^
TypeError: Cannot read property 'prototype' of undefined
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 6, 2024 12:29
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@mfirry
mfirry / 0.96
Last active August 29, 2015 14:16
∙ ./gradlew -Dairpal.prestoVersion=0.96 clean shadowJar -Dairpal.useLocalNode 21:16 marco@mymachine
:cleanAssets UP-TO-DATE
:clean
:nodeSetup SKIPPED
:installAssets
:buildAssets
[21:18:03] Using gulpfile ~/playground/airpal/src/main/resources/assets/gulpfile.js
[21:18:03] Starting 'browserify'...
[21:18:03] Bundling app.js...
[21:18:03] Bundling plugin.js...
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@remmelt
remmelt / bamboo-to-slack.py
Last active August 31, 2023 00:35
Post an Atlassian Bamboo build result to Slack
#!/usr/bin/python
"""
Create a stage in your project, make it the last stage.
Make a task in the stage with this inline script:
#! /bin/bash
/some/path/bamboo-to-slack.py "${bamboo.planKey}" "${bamboo.buildPlanName}" "${bamboo.buildResultsUrl}"
@dustismo
dustismo / gist:6203329
Last active November 30, 2022 00:22
How to install leveldb on ubuntu
sudo apt-get install libsnappy-dev
wget https://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz
tar -xzf leveldb-1.9.0.tar.gz
cd leveldb-1.9.0
make
sudo mv libleveldb.* /usr/local/lib
cd include
sudo cp -R leveldb /usr/local/include
@tawfekov
tawfekov / generator.php
Last active March 2, 2024 16:06
Doctrine2 Generate Entities form Existing Database
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();
@jakebellacera
jakebellacera / mamp-mysql2-rbenv.md
Created August 22, 2012 20:29
Instructions on how to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv

How to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv

Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.

Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.

First, install Ruby via rbenv

  1. Install homebrew
  2. Install rbenv: brew install rbenv, follow any instructions homebrew gives you after the installation is complete.
@masnun
masnun / annotations.php
Created August 12, 2012 15:54
Demonstration of Doctrine Annotation Reader
<?php
/**
*@Annotation
*/
class AnnotatedDescription
{
public $value;
public $type;
public $desc;
}
@roboshoes
roboshoes / touchmouse.js
Created April 13, 2012 10:43
This snippet maps mouse events and touch events onto one single event. This makes it easier in the code since you have to listen to only one event regardles whether it's desktop or mobile.
(function() {
/* == GLOBAL DECLERATIONS == */
TouchMouseEvent = {
DOWN: "touchmousedown",
UP: "touchmouseup",
MOVE: "touchmousemove"
}
/* == EVENT LISTENERS == */