Skip to content

Instantly share code, notes, and snippets.

View kurai021's full-sized avatar
🎯
Focusing

Richard Armuelles kurai021

🎯
Focusing
View GitHub Profile
@kurai021
kurai021 / gruntfile.js
Created February 13, 2014 18:42
Gruntfile firefoxos-generator
'use strict';
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
[
'grunt-contrib-cssmin',
'grunt-contrib-clean',
'grunt-contrib-copy',
@kurai021
kurai021 / gist:2f6c8f6e0adc5fef0aed
Last active August 29, 2015 14:02
Problema con Angular.js
<!-- tengo esto escrito en mi index.html-->
<div ng-switch on="page">
<div ng-switch-when="home">
<div ng-include="'views/home.html'"></div>
</div>
<div ng-switch-when="charts">
<div ng-include="'views/charts.html'"></div>
</div>
window.onunload = function() {
var request_reopen = navigator.mozAlarms.add(new Date((+new Date()) + 30000), 'ignoreTimezone', {
type: 'yolo'
});
console.log('setting to', new Date((+new Date()) + 30000) + '')
request_reopen.onsuccess = function() {
console.log('success');
}
@kurai021
kurai021 / gist:355b97cd28aa1ad42343
Created October 27, 2014 23:05
Task List estructura
<ul id="task-list">
<li class="listitem" style="border-left: 5px solid gray;" aria-disabled="true">
<p class="tasktitle">tarea 1</p>
<p>09:00, octubre 27 2014</p>
<button class="danger" data-task="tarea 1" data-l10n-id="DeleteBtn">Delete</button>
</li>
<li class="listitem" style="border-left: 5px solid yellow;">
<p class="tasktitle">tarea 2</p>
<p>09:00, octubre 27 2014</p>
info: Analyzing application dependencies in
WARN package.json blogMachinarium021@0.0.1 No repository field.
WARN package.json blogMachinarium021@0.0.1 No readme data.
info: Checking app availability blogMachinarium021
info: Checking app availability blogMachinarium021
info: Creating app blogMachinarium021
info: Creating app blogMachinarium021
info: Creating snapshot 0.0.1
info: Uploading: [=============================] 100%
error: Error creating blogMachinarium021
@kurai021
kurai021 / client.js
Created January 6, 2015 12:39
Javascript Doorbell
function getUuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
}
var deviceId = getUuid();
var wsOpen = false;
var ws;
function connect() {
@kurai021
kurai021 / virtualbox
Last active August 29, 2015 14:13
config Virtualbox OSX 10.10
//cambiar Yosemite 10.10 Retail por el nombre de la maquina virtual
VBoxManage modifyvm "Yosemite 10.10 Retail" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "Yosemite 10.10 Retail" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "Yosemite 10.10 Retail" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Yosemite 10.10 Retail" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "Yosemite 10.10 Retail" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Yosemite 10.10 Retail" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
@kurai021
kurai021 / gist:5158bb813a04987f1d4c
Last active August 29, 2015 14:17
Slitaz delay
editar: /boot/grub/menu.lst
title SliTaz GNU/Linux 3.0 (Kernel 2.6.34-slitaz)
root(hd0,0)
kernel /boot/vmlinuz-2.6.34-slitaz root=/dev/sda1 vga=normal rootdelay=10
@kurai021
kurai021 / codigo.c
Last active August 29, 2015 14:21
codigo para suma y resta simple...
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int opcion;
int cantidad_val = 0;
int contador = 0;
int sumando = 0;
int resultado = 0;
/**
* Tabzilla global navigation for Mozilla projects
*
* This code is licensed under the Mozilla Public License 1.1.
*
* Portions adapted from the jQuery Easing plugin written by Robert Penner and
* used under the following license:
*
* Copyright 2001 Robert Penner
* All rights reserved.