Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/python
# coding=utf-8
import cgi
import cgitb
cgitb.enable()
from datetime import datetime, timedelta
import json
import os
ac_add_options --enable-application=mail
ac_add_options --enable-debug
ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
mk_add_options MOZ_OBJDIR=/Users/bwinton/Programming/firefox/objdir-comm-central
#!/usr/bin/env node
var suncalc = require('suncalc');
var phase = suncalc.getMoonIllumination(new Date()).phase;
var phases = [
"🌑",
"🌒",
"🌓",
"🌔",
"🌕",
#!/usr/bin/env node
var suncalc = require('suncalc');
var phase = suncalc.getMoonIllumination(new Date()).phase;
var phases = [
"🌑",
"🌒",
"🌓",
"🌔",
"🌕",
#!/usr/bin/env node
var suncalc = require('suncalc');
var phase = suncalc.getMoonIllumination(new Date()).phase;
var phases = [
"🌑",
"🌒", "🌒", "🌒", "🌒", "🌒", "🌒", "🌒",
"🌓",
"🌔", "🌔", "🌔", "🌔", "🌔", "🌔", "🌔",
"🌕",
#!/usr/bin/env node
var suncalc = require('suncalc');
var phase = suncalc.getMoonIllumination(new Date()).phase;
var phases = [
"🌑",
"🌒", "🌒", "🌒", "🌒", "🌒", "🌒", "🌒",
"🌓",
"🌔", "🌔", "🌔", "🌔", "🌔", "🌔", "🌔",
"🌕",
diff --git a/browser/base/content/newtab/search.js b/browser/base/content/newtab/search.js
--- a/browser/base/content/newtab/search.js
+++ b/browser/base/content/newtab/search.js
@@ -208,22 +208,22 @@ let gSearch = {
else if (engine.iconBuffer) {
uri = this._getFaviconURIFromBuffer(engine.iconBuffer);
type = "favicon";
}
this._nodes.logo.setAttribute("type", type);
@bwinton
bwinton / page.diff
Created December 8, 2014 20:34
How does this look to everyone?
diff --git a/index.html b/index.html
index d23efde..9bba611 100755
--- a/index.html
+++ b/index.html
@@ -36,5 +36,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<script src="js/vendor/jquery/dist/jquery.min.js" charset="utf-8"></script>
<script src="js/main.js"></script>
+ <script>
+ window.addEventListener("message", function (event) {
diff --git a/data/newtabicons-content.js b/data/newtabicons-content.js
index e2a9acb..b01fdbe 100644
--- a/data/newtabicons-content.js
+++ b/data/newtabicons-content.js
@@ -139,5 +139,7 @@ function overrideToggle() {
});
}
-addThumbnails(window.document.getElementsByClassName('newtab-cell'));
-overrideToggle();
@bwinton
bwinton / whimsy listener
Created December 15, 2014 15:43
How to do special things if Whimsy is installed.
window.addEventListener("message", function (event) {
if (event.data === 'whimsy:enabled') {
document.querySelector('body').classList.add('whimsical');
}
}, false);