Skip to content

Instantly share code, notes, and snippets.

View dwi2's full-sized avatar

Tzu-Lin Huang dwi2

  • Fukuoka, Japan
  • 05:47 (UTC +09:00)
View GitHub Profile
@dwi2
dwi2 / topsites.json
Last active November 16, 2015 09:24
example top-sties
[
{
"title": "Facebook",
"url": "http://facebook.com",
"frecency": 0
},
{
"title": "Hackernews",
"url": "http://news.ycombinator.com/",
"frecency": 0
@dwi2
dwi2 / umd-module.js
Last active August 28, 2015 06:34 — forked from mpizza/umd-module.js
UMD (amd, common.js, window)
;(function(define){define(function(require,exports,module){
//...
});})(typeof define=='function'&&define.amd?define
:(function(n,w){'use strict';return typeof module=='object'?function(c){
c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){
return w[n];},m.exports,m);w[n]=m.exports;};})('module-name',this));
@dwi2
dwi2 / make_onsave.js
Last active August 29, 2015 14:26 — forked from begeeben/develop.js
A handly script to make and run Firefox OS Gaia. Watch for file changes and make on the fly.
// Usage: node make_onsave.js b2g tv browser
// node make_onsave.js nightly phone settings
// node make_onsave.js simulator tv tv-deck
// node make_onsave.js b2g tv
'use strict';
var fs = require('fs');
var path = require('path');
var exec = require('child_process').exec;
diff --git a/build/config/tv/custom-prefs.js b/build/config/tv/custom-prefs.js
index d007de0..62c3511 100644
--- a/build/config/tv/custom-prefs.js
+++ b/build/config/tv/custom-prefs.js
@@ -8,3 +8,4 @@ user_pref('b2g.system_manifest_url',
'app://smart-system.gaiamobile.org/manifest.webapp');
user_pref('b2g.neterror.url',
'app://smart-system.gaiamobile.org/net_error.html');
+user_pref('layout.css.devPixelsPerPx', '0.75');
@dwi2
dwi2 / flame-kk-no-devpx-landscape.patch
Last active August 29, 2015 14:25 — forked from huchengtw-moz/flame-kk-no-devpx-landscape.patch
patch to remove device pixel ratio
diff --git a/b2g/chrome/content/shell.css b/b2g/chrome/content/shell.css
index 44cdafd..2504849 100644
--- a/b2g/chrome/content/shell.css
+++ b/b2g/chrome/content/shell.css
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
html {
- background: black;
+ background: transparent;
@dwi2
dwi2 / sample_motor_command
Last active August 29, 2015 14:23
Sample Motor Command
0, 0, 0, 0, 0
-58, 55, 0, 0, 0
-3, -12, 0, 0, 0
1, 27, 0, 0, 0
-2, 47, 0, 0, 0
1, 64, 0, 0, 0
0, 64, 0, 0, 0
-2, 64, 0, 0, 0
5, 3, 0, 0, 0
4, 26, 0, 0, 0
@dwi2
dwi2 / default-cards.json
Last active August 29, 2015 14:19
default-cards.json with folder
{
"card_list": [
{
"type": "Deck",
"deckClass": "tv",
"manifestURL": "app://tv-deck.gaiamobile.org/manifest.webapp",
"group": "tv"
},
{
"type": "Application",
@dwi2
dwi2 / build.js
Created March 12, 2015 08:34
CostControl build script for debuguy
/* global require, exports */
'use strict';
var utils = require('utils');
function removeDesktopOnlyFolder(appStageDir) {
var desktopOnlyDir = utils.getFile(appStageDir, 'js', 'desktop-only');
if (desktopOnlyDir.exists()) {
@dwi2
dwi2 / build.js
Created March 12, 2015 08:16
CallScreen build script for debuguy
'use strict';
/* global require, exports */
var utils = require('utils');
var CallScreenAppBuilder = function() {
};
CallScreenAppBuilder.prototype.execute = function(options) {
utils.copyToStage(options);
@dwi2
dwi2 / PresentationSessionStateEvent.webidl
Created March 5, 2015 03:19
PresentationSessionStateEvent.webidl
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
enum PresentationSessionState
{
"connected",
"disconnected",