This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First these two lines | |
let manifest = browser.runtime.getManifest(); | |
browser.extension.getURL(manifest.options_page || manifest.options_ui.page); | |
// Then this one | |
browser.tabs.query({}, tabs => { console.log(JSON.stringify(tabs)); }) | |
// Then this | |
browser.runtime.openOptionsPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Highlight tabs and trailing whitespace everywhere | |
(setq whitespace-style '(face trailing tabs)) | |
(custom-set-faces | |
'(whitespace-tab ((t (:background "red"))))) | |
(global-whitespace-mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def foo(b={}): | |
b[random.random()] = "bar" | |
print b | |
for i in range(10): | |
print "Iteration " + str(i + 1) | |
foo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/localeTools.py b/localeTools.py | |
index 140f22c..f80a187 100644 | |
--- a/localeTools.py | |
+++ b/localeTools.py | |
@@ -299,7 +299,7 @@ def setupTranslations(localeConfig, projectName, key): | |
allowed = set() | |
allowedLocales = json.load(urllib2.urlopen( | |
'https://crowdin.com/languages/languages_list?callback=' | |
- )) | |
+ ))['data'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/messageResponder.js b/messageResponder.js | |
index 65e91ea..7ed00c7 100644 | |
--- a/messageResponder.js | |
+++ b/messageResponder.js | |
@@ -21,8 +21,6 @@ | |
(function(global) | |
{ | |
- let ext = global.ext || require("ext_background"); | |
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
let fs = require("fs"); | |
if (process.argv.length != 3) | |
{ | |
console.log("Usage: nodejs strip.js filename.json"); | |
process.exit(1); | |
} | |
let filename = process.argv[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Some keypresses are hard to send to VMs running in webmate.io as they are intercepted | |
// by the web browser. In those cases you can manually send them. Open the JavaScript console | |
// and paste one of these snippets. | |
// Notes: | |
// - There's a handy sheet of the key codes here http://www.cambiaresearch.com/articles/15/javascript-key-codes. | |
// - For buttons like Control or Alt you need to use "keydown", but for other keys "keypress". | |
// - Don't forget to also send a "keyup", otherwise the key will be held down forever! | |
// Control f | |
$("#console").wmks("sendKeyCode", 17, "keydown"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: | |
We have found a serious bug whereby a content blocking rule list with a certain rule can stop Safari from being able to parse certain URLs. Specifically we found this to happen for Google text ad links which are supposed to redirect to the advertisement. Instead of the browser being redirected, Safari displays an error (see screenshot). This error goes away when the content blocking API is not used, and when it is used without certain troublesome rules. | |
Steps to Reproduce: | |
1. Create a new empty Safari Extension. | |
2. Create a file called rules.json containing the following: | |
[ | |
{ | |
"trigger": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ssh-tunnel.core | |
(require [clj-ssh.ssh :as ssh])) | |
(defn ssh-tunnel | |
"Run a ssh tunnel in a deamon thread." | |
[session local-port remote-port] | |
(ssh/with-local-port-forward [session local-port remote-port] | |
(.setDaemonThread session true) | |
(ssh/with-connection session | |
(.setServerAliveInterval session 1000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://web.archive.org/web/20040604013918/http://www.tees.ac.uk/sections/about/termdates.cfm | |
https://web.archive.org/web/20120514124434/http://www.tees.ac.uk/sections/stud/termdates.cfm | |
2003 - 2004 | |
Semester 1 | |
Monday 22 September 2003 - Friday 23 January 2004 | |
Semester 2 | |
Monday 2 February 2004 - Friday 28 May 2004 | |
Autumn Term | |
Monday 22 September 2003 - 12 December 2003 |