This gist is no longer in use.
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
# Synchronize history between bash sessions | |
# | |
# Make history from other terminals available to the current one. However, | |
# don't mix all histories together - make sure that *all* commands from the | |
# current session are on top of its history, so that pressing up arrow will | |
# give you most recent command from this session, not from any session. | |
# | |
# Since history is saved on each prompt, this additionally protects it from | |
# terminal crashes. |
A brief example of the latest idea for communicating with PhantomJS from the client-side.
This is the next revision of ideas discussed in a previous Gist:
https://gist.github.com/JamesMGreene/3716654
This example demonstrates shimming in the new communication channels under discussion via existing methods (WebPage#onCallback
and window.callPhantom
).
The example does, however, take advantage of a yet-to-be-implemented EventEmitter API for core modules in the PhantomJS outer context. This API would add the following methods to core modules as appropriate:
on
/addEventListener
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
// NOTE: Some code taken from this StackOverflow question: | |
// http://stackoverflow.com/questions/12866060/detecting-pepper-ppapi-flash-with-javascript | |
var isUsingPepperFlash = (function() { | |
var getFlashPlayerFileName = function(mimeTypes, type) { | |
return ( | |
mimeTypes && | |
mimeTypes[type] && | |
mimeTypes[type].enabledPlugin && | |
mimeTypes[type].enabledPlugin.filename |
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
exports = { | |
"Test onLoad Event with AMD": function (test) { | |
test.expect(1); | |
var amdTester = (function() { | |
var amdCache = { | |
"zc": zeroClipboard | |
}; | |
return function(depIds, cb) { | |
var depVals = depIds.map(function(id) { return amdCache[id]; }); |
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
function inherit (child, parent) { | |
function proxy () {}; | |
proxy.prototype = parent.prototype; | |
child.prototype = new proxy(); | |
}; | |
function Parent () {} | |
function Child () {} | |
inherit(Child, Parent); |
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
var urls = [ | |
/* Wildcard CORS enabled - Works in PhantomJS 1.9.0 */ | |
'http://updates.html5rocks.com', | |
/* CORS disabled - Fails in PhantomJS 1.9.0 (and every other version) */ | |
'http://www.google.com', | |
/* Hack workaround? */ | |
/* | |
function(httpGet, callback) { | |
phantom.page.settings = (phantom.page.settings || {}); | |
phantom.page.settings.webSecurityEnabled = false; |
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
*************************** | |
* SHOULD BE REPLACED! * | |
*************************** | |
Same project, issue, no octothorpe: | |
- Issue 7 | |
- issue 7 | |
- ISSUE 7 | |
Same project, issue, with octothorpe: |
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/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h | |
index 82245f3..932d254 100644 | |
--- a/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h | |
+++ b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h | |
@@ -175,18 +175,20 @@ namespace WTF { | |
} | |
template<typename T, typename U, typename V> | |
- inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value) | |
+ inline pair<typename HashSet<T,U,V>::const_iterator, bool> HashSet<T,U,V>::add(const ValueType &value) |
NewerOlder