Skip to content

Instantly share code, notes, and snippets.

View UlisesGascon's full-sized avatar
😎
Focus on FOSS Projects!

Ulises Gascón UlisesGascon

😎
Focus on FOSS Projects!
View GitHub Profile
function throwStack (pcErrorMessage) {
var oError = new Error(pcErrorMessage);
return oError.stack;
};
// try catch (memory usage problems)
function ejemplo () {
// ...
try {
http://www.youtube.com/watch?v=MXEGLGmpCfo
int ledPin = 13;
//led for visualization (use 13 for built-in led)
int speakerPin = 11;
//speaker connected to one of the PWM ports
#define c 261
#define d 294
#define e 329
#define f 349
@UlisesGascon
UlisesGascon / isset() in javascript
Created May 28, 2015 20:00
isset() in JS ... like in PHP
function isset ()
{
var argumentos = arguments,
duracion = argumentos.length,
valorCero = 0,
undef;
if (duracion === 0)
{
<form action="" method="POST">
<p>
<label for="email"><?php _e( 'Email', 'ignacio' ); ?>
<input id="email" type="email" name="email" value="" />
</label>
</p>
<p>
<label for="message"><?php _e( 'Message', 'ignacio' ); ?></label>
<textarea id="message" name="message"></textarea>
</p>
<?php
if ( post_password_required() )
return;
?>
<div id="comments" class="comments-area">
<?php if ( comments_open() && get_comments_number() ): ?>
function FactoriaVehiculos() {
this.createVehicle = function (type) {
var vehicle;
if (type === "coche") {
vehicle = new Coche();
} else if (type === "moto") {
vehicle = new Moto();
} else if (type === "autobus") {
vehicle = new Autobus();
@UlisesGascon
UlisesGascon / FactoryFB
Created June 13, 2015 09:30
.factory with Firebase in Angular
.factory( 'DBService', [ '$FirebaseArray', function ($FirebaseArray) {
var oFB_DB = new Firebase('https://<<FIREBASE-URL>>.firebaseio.com');
return {
getAlumnos: { function (){}
return $firebaseArray(oFB_DB);
}
};
}]);
@UlisesGascon
UlisesGascon / pptls - Game Rules
Created June 20, 2015 19:19
pptls - Game Rules
// Si el jugador es piedra
}else if( eleccionJugador == "piedra") {
// Piedra gana a tijeras.
if (eleccionArduino == "tijeras"){
Serial.print("Jugador Gana! ...piedra aplasta las tijeras");
// Piedra gana a lagarto.
}else if( eleccionArduino == "lagarto"){
Serial.print("Jugador Gana! ...piedra aplasta al lagarto");
@UlisesGascon
UlisesGascon / pptls - setup
Last active August 29, 2015 14:23
pptls - setup
// ==== Definiendo los Botones ====
// botones
int boton1 = 12;
int boton2 = 11;
int boton3 = 10;
int boton4 = 9;
int boton5 = 8;