Skip to content

Instantly share code, notes, and snippets.

View pjnovas's full-sized avatar

Pablo Novas pjnovas

  • Buenos Aires, Argentina
View GitHub Profile
#pragma strict
var target : Transform; // Reference to the Objects transform.
var targetBody: Rigidbody2D;
var distance: float = 3.0;
var height: float = 3.0;
var width: float = 3.0;
var damping: float = 5.0;

Enter grooveshark, open console and paste the code

window.setInterval(function(){
  var modal = $(".lightbox-interactionTimeout");
  if (modal.is(":visible")){
    $("#lightbox-footer-left>a", modal).click();
  }
}, 5000);
@pjnovas
pjnovas / installHaxe.md
Last active August 29, 2015 14:02
Install Haxe and HaxePunk

Install HAXE 3.1.1 since 3.1.3 (latest right now) won't work with OpenFL

  1. Go to Haxe
  2. Download Haxe Lib for windows
  3. Run Installer
  4. open terminal and try haxe -version

Hello World

  1. Create a file named HelloWorld.hx
<!-- iPhone and iPod touch -->
<gap:splash src="Default.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="Default@2x.png" gap:platform="ios" width="640" height="960" />
<!-- iPhone 5 / iPod Touch (5th Generation) -->
<gap:splash src="Default-568h@2x.png" gap:platform="ios" width="640" height="1136" />
<!-- iPad -->
<gap:splash src="Default-Portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="Default-Landscape.png" gap:platform="ios" width="1024" height="768" />
@pjnovas
pjnovas / gcm.md
Created May 30, 2014 18:46
Configure Google Cloud Messaging (GCM) for a Phonegap App
  1. Go To Google Developers Console
  2. Create a project and enter on its console
  3. Left panel go to APIs & auth -> Credentials
  4. Click Create New Key -> Server Key -> Put the public IP or domain where the server remains (for testing a 0.0.0.0/0. can be used)
  5. Left panel go to APIs & auth -> APIs -> Look for Google Cloud Messaging for Android and turn it ON
  6. Copy the API key generated

Then go ot Google Developers Console at GooglePlay

@pjnovas
pjnovas / android.debug.md
Last active July 18, 2017 06:03
Generate HasKeys for a Phonegap app with Android - Debug and Release

Download and install:

Only versions e or d DO NOT USE k


  1. Navigate to C:\Program Files (x86)\Java\jre7\bin
  2. Generate the hash
@pjnovas
pjnovas / InstallationStack.md
Last active October 21, 2020 03:59
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
@pjnovas
pjnovas / scene.js
Created November 3, 2012 18:10
Share Scene logic client & server side
var isClient = (typeof global === "undefined") ? true : false;
(function(arkanoid) {
var arkanoid = arkanoid || {};
if (!isClient){
arkanoid.Ball = require('./Ball.js');
arkanoid.Padd = require('./Padd.js');
}
var juego = (function(){
  var reqAnimId,
    canvas,
    contexto,
canvasBuffer,
contextoBuffer;
 
  function actualizar() {
    //actualizaciones del estado
  }
@pjnovas
pjnovas / 1.js
Created October 17, 2011 15:30
javascript001
var foo = false; // Correcto: asigno a foo el valor literal false
false.miPropiedad; // Incorrecto
false.miMetodo(); // Incorrecto
false = true; // Incorrecto
true = "algun texto"; // Incorrecto