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 fxxksise | |
// @namespace http://djyde.github.io | |
// @version 0.1.1 | |
// @description fixed sise js mistake | |
// @author Randy | |
// @match http://class.sise.com.cn:7001/sise/* | |
// @grant none | |
// ==/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
//insert | |
storedb('players').insert({"name":"Randy","sex":"male","score":20},function(err,result){ | |
if(!err){ | |
//do sth... | |
} else //do sth... | |
}) | |
//find | |
storedb('players').find({"name":"Randy"},function(err,result){ | |
if(!err){ |
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
//It depends on Google Feed API | |
//Check <script type="text/javascript" src="https://www.google.com/jsapi"></script> is included in HTML | |
var ggrss = (function(){ | |
var cache = []; | |
return { | |
parse: function(url,num,callback){ | |
google.load("feeds","1"); | |
//I found that google.load() should not be called while your page is ready, or the page will be cleared |
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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");</script> |
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 = require('https'); | |
function API(host){ | |
this.get = function(path,method,callback){ | |
var options = { | |
host: host, | |
path: path, | |
method: method | |
}; |
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 web = require('webjs'), | |
mongoose = require('mongoose'), | |
config = require('./config'), | |
EventProxy = require('EventProxy.js').EventProxy, | |
Schema = mongoose.Schema; | |
mongoose.connect('mongodb://' + config.db.host + ':' + config.db.port + '/weblog'); | |
var Comment = new Schema({ | |
author: String, | |
content: String, |
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
print 'Hello World' |
NewerOlder