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 r = function(g){ var it = g(function(v){ it.send(v); }); it.next(); }; | |
r(function(resume) { | |
var res = yield util.httpGet(url, function(xhr) { | |
resume(xhr.responseText); | |
}); | |
alert(res); | |
yield; | |
}); |
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 $XX(xpath, context, resolver) { | |
context || (context = document); | |
var doc = context.ownerDocument || context; | |
var result = doc.evaluate(xpath, context, resolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
result.__iterator__ = function() { for (let i = 0, len = this.snapshotLength; i < len; i++) yield this.snapshotItem(i); }; | |
return result | |
} |
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(cdata){ | |
var s = document.createElement("script"); | |
s.type = "application/javascript;version=1.7"; | |
s.textContent = cdata.toString(); | |
var head = document.getElementsByTagName("head")[0]; | |
head.appendChild(s); | |
head.removeChild(s); | |
})(<><![CDATA[ | |
// do somthing. |
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
create table a( | |
id number, | |
val varchar2(20) | |
); | |
create table b( | |
id number, | |
val varchar2(20) | |
); | |
update a set |
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
update ( | |
select | |
a.id a_id | |
, b.id b_id | |
, a.val a_val | |
, b.val b_val | |
from a inner join b | |
on a.id = b.id | |
) set | |
a_val = b_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
javascript: (function() { | |
var es = document.getElementsByTagName('div'); | |
function invokeMouseEvent(elem, evname) { | |
var e = document.createEvent('MouseEvents'); | |
e.initMouseEvent(evname, true, true, e.view||window, 0, 0, 0, 0, 0, | |
false, false, false, false, 0, null); | |
elem.dispatchEvent(e); | |
} | |
for (var i = 0, len = es.length; i < len; i++) { | |
var e = es[i]; |
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
// ==UserScript== | |
// @name G+ FormatDate | |
// @author suVene | |
// @version 0.1.0 | |
// @namespace https://gist.github.com/raw/1115074/3a9327ed58907df0db1b755361875fedac87e682/G+.FormatDate.user.js | |
// @description formate date for post date | |
// @include https://plus.google.com/* | |
// @match https://plus.google.com/* | |
// ==/UserScript== |
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
# update | |
sudo port -d selfupdate | |
sudo port -d sync | |
sudo port upgrade outdated | |
# install | |
sudo port installed | |
sudo port search <module> | |
sudo port install <module @version> | |
sudo port variants <module> |
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
[submodule "bundle/vim-pathogen"] | |
path = bundle/vim-pathogen | |
url = git://github.com/tpope/vim-pathogen.git | |
[submodule "bundle/minibufexpl.vim"] | |
path = bundle/minibufexpl.vim | |
url = git://github.com/fholgado/minibufexpl.vim.git | |
[submodule "bundle/eregex.vim"] | |
path = bundle/eregex.vim | |
url = git://github.com/othree/eregex.vim | |
[submodule "bundle/vim-mru"] |
OlderNewer