Skip to content

Instantly share code, notes, and snippets.

@alivedise
alivedise / modelex.js
Created March 9, 2012 17:16
$.Model: 2 or more models Combination
$.Model('jQuery.Modelex', {
findAll: function(params, success, error){
return $.when(A.findAll({}), B.findAll({})).done(success).fail(error);
},
models: function(dataA, dataB){
var data = $.extend({}, dataA, dataB);
var array = [];
$.each(data, function(index, value){ array.push(new this(value)) });
return array;
}
This file has been truncated, but you can view the full file.
$.Model.extend("GS.Models.Base", {
cache: {},
getOneFromCache: function( a, b ) {
return this.addLibraryFavoriteFlags(this.cache[_.orEqual(b, "") + a])
},
addLibraryFavoriteFlags: function( a ) {
var b = this.shortName.toLowerCase() + "s";
if ( a && GS.user ) {
var c = a[a.Class.id];
if ( GS.user.favorites[b] ) a.isFavorite = _.defined(GS.user.favorites[b][c]) ? 1 : 0;

Cheers,

I am web front-end engineer, especially in html/css/javascript.

Projects

Banshee

Client side MVC framework, build upon javascriptMVC. It generate a big web application, a web-based survellience system of Network Recording System.

Technology used

@alivedise
alivedise / resume.md
Last active October 3, 2015 15:58
Resume.md

Sass/Less 比較

變數

Sass             | Less
-----------------+-----------------
$color: red;     | @color: red;
div {            | div {
  color: $color; |   color: @color;

} | }

@alivedise
alivedise / flash.patch
Created June 7, 2012 08:36
Patch for demo
diff --git flash.sh flash.sh
index a9256ff..5093078 100755
--- flash.sh
+++ flash.sh
@@ -120,6 +120,12 @@ case "$1" in
exit $?
;;
+"demo")
+ make -C gaia install-media-samples ADB="$ADB"
@alivedise
alivedise / gaiaMakefile.patch
Created June 7, 2012 08:37
Patch for demo#2
diff --git Makefile Makefile
index e86e5de..5935f2a 100644
--- Makefile
+++ Makefile
@@ -26,6 +26,8 @@ DEBUG?=0
REPORTER=Spec
+#EXCLUDED=uitest test-agent
+
<!DOCTYPE html>
<html manifest="manifest.appcache">
<head>
<meta charset="utf-8">
<meta http-equiv="pragma" content="no-cache">
<!-- System -->
<script>
</script>
</head>
@alivedise
alivedise / worldvision_next.md
Created June 29, 2012 09:20
Worldvision website NEX-T proposal

Login

  • Username and password should at least be encrypted with BASE64:-)

Main Page

  • Could not see urgent and normal cases at the same time.

Questions

  • What is UX for translator?
  • What is UX for employee?
@alivedise
alivedise / gist:3232005
Created August 2, 2012 00:44
System UI hierarchy

Hi,

https://github.com/mozilla-b2g/gaia/issues/2039 I am dealing with a issue about zIndex audit, I would refactor system-app dom structure and style tremendously. This mail is to throw my idea and plan.

The story

  1. System app forms our UI base
  2. System app contains many intractable UI part