Skip to content

Instantly share code, notes, and snippets.

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;
});
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
}
(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.
create table a(
id number,
val varchar2(20)
);
create table b(
id number,
val varchar2(20)
);
update a set
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
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];
// ==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==
@suvene
suvene / mac_ports
Created March 18, 2012 06:13
mac ports
# 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>
@suvene
suvene / gist:2073781
Created March 18, 2012 14:19
vim-plugin
[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"]
@suvene
suvene / gist:2137801
Created March 20, 2012 16:17 — forked from zaininnari/git-install.csh
さくらインターネット スタンダードプラン git インストール
We couldn’t find that file to show.