Skip to content

Instantly share code, notes, and snippets.

View oceangravity's full-sized avatar
💭
WebsKit momentum

Juan Carlos Galindo Navarro oceangravity

💭
WebsKit momentum
View GitHub Profile
@oceangravity
oceangravity / config.js
Created September 6, 2013 00:02
Test de Uakami
/*global require */
/**
* @function
*/
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if(/windows phone|Tablet PC|android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|i
@oceangravity
oceangravity / phpstorm64bits.bat
Created August 25, 2014 18:33
Run PHPStorm in 64 bits
java "-server" "-Xms128m" "-Xmx2048m" "-XX:MaxPermSize=350m" "-XX:ReservedCodeCacheSize=64m" "-ea" "-Dsun.io.useCanonCaches=false" "-Djava.net.preferIPv4Stack=true" "-XX:+UseCodeCacheFlushing" "-XX:+UseConcMarkSweepGC" "-XX:SoftRefLRUPolicyMSPerMB=50" -Djb.vmOptionsFile="C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\PhpStorm.exe.vmoptions" "-Xbootclasspath/a:C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\../lib/boot.jar" -Didea.paths.selector=WebIde70 -Didea.platform.prefix=PhpStorm -Didea.no.jre.check=true -cp "C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\bootstrap.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\extensions.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\util.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\jdom.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\log4j.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\trove4j.jar;C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\\..\lib\jna.jar" com.intelli
@oceangravity
oceangravity / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function parse(subselector) {
class CoinChange {
constructor(changes) {
this.coins = 0;
this.changes = changes;
this.output = {};
};
getEquivalence(equivalence) {
let output = 0;
if(this.coins / equivalence > 1){
output = (this.coins - (this.coins % equivalence)) / equivalence;
class CoinChange {
constructor(changes) {
this.coins = 0;
this.changes = changes;
this.output = {};
};
getEquivalence(equivalence) {
let output = 0;
if(this.coins / equivalence > 1){
output = (this.coins - (this.coins % equivalence)) / equivalence;
<biblioteca>
<libro>
<nombre>Mastering Gradle</nombre>
<autor>Mainak Mitra</autor>
</libro>
<libro>
<nombre>Mastering GitHub</nombre>
<autor>Mainak Mitra</autor>
</libro>
<libro>
@oceangravity
oceangravity / service-worker.js
Created November 27, 2018 11:17
WebsKit - E05
var CACHE_VERSION = 'WebsKit-CACHE-E05'
var CACHE_FILES = [
'./'
]
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(CACHE_VERSION)
.then(function (cache) {
<template>
<keep-alive>
<transition-group tag="div" name="tool" appear>
<div class="wk-tool-inner" v-for="number in [active]" v-bind:key="number">
<component :is="componentInstance"/>
</div>
</transition-group>
</keep-alive>
</template>
<script>
@oceangravity
oceangravity / LongestIncreasingSequence.php
Created December 2, 2021 11:49
Have the function LongestIncreasingSequence(arr) take the array of positive integers stored in arr and return the length of the longest increasing subsequence (LIS). A LIS is a subset of the original list where the numbers are in sorted order, from lowest to highest, and are in increasing order. The sequence does not need to be contiguous or uni…
<?php
/**
* Longest Increasing Sequence
* Have the function LongestIncreasingSequence(arr) take the array of positive integers stored in arr
* and return the length of the longest increasing subsequence (LIS). A LIS is a subset of the original list
* where the numbers are in sorted order, from lowest to highest, and are in increasing order.
* The sequence does not need to be contiguous or unique, and there can be several different subsequences.
* For example: if arr is [4, 3, 5, 1, 6] then a possible LIS is [3, 5, 6], and another is [1, 6].
* For this input, your program should return 3 because that is the length of the longest increasing subsequence.
*