This file contains hidden or 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
#!/usr/bin/env ruby | |
# * * * * * bijin_wallpaper.rb | |
require 'pathname' | |
require 'open-uri' | |
require 'fileutils' | |
include FileUtils | |
IMAGE_DIR = '/Users/youpy/Documents/bijint' |
This file contains hidden or 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
Array.prototype.join2 = function(f) { | |
if(typeof f != 'function') { | |
return this.join(f); | |
} | |
return this.reduce(function(memo, item) { | |
return memo + f() + item; | |
}); | |
}; | |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
import("lib-json"); | |
import("lib-list"); // Array.prototype.reduce | |
import("lib-jlp"); | |
import("lib-text-converter"); | |
convertText(function(text) { | |
var sentence = text || ' '; | |
var separator = "@?./+*- "; |
This file contains hidden or 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 appjet.com: post changes to gist | |
// @namespace http://d.hatena.ne.jp/youpy/ | |
// @include http://appjet.com/app/*/ide | |
// ==/UserScript== | |
(function() { | |
if(window != window.parent) return; | |
var urlbase = location.href.replace('/ide', ''); |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
import("lib-json"); | |
import("lib-jlp"); | |
import("lib-text-converter"); | |
var converter = new TextConverter(); | |
converter.addParam('replacement'); | |
converter.setConverter(function(text, params) { |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
var usage = """import("lib-jlp"); | |
import("lib-json"); | |
var maService = new JLP.MAService(); | |
print(P(CODE(JSON.stringify(maService.parse('庭には二羽ニワトリがいる。'))))); | |
"""; | |
print(H1(appjet.appName)); | |
print(P('Handy library to use ', |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
print(H1(appjet.appName)); | |
print(P('Library for building simple text converter application')); | |
print(P( | |
A({href:'http://docs.lib-text-converter.appjet.net/'}, 'documentation'), | |
' / ', | |
A({href:'http://text-converter-example.appjet.net/'}, 'example'), | |
' / ', | |
A({href:'http://text-converter-example.appjet.net/convert?q=hello'}, 'result(plain)'), |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
print(H1(appjet.appName)); | |
print(P(A({href:'http://docs.lib-html-xpath.appjet.net/'},'documentation'))); | |
/* appjet:library */ | |
/** | |
* @overview Library for searching html with XPath<br><br> | |
* | |
* In particular, it defines the function xget(). |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
import("lib-json"); | |
import("lib-html-xpath"); | |
function get_main() { | |
page.setMode("plain"); | |
var result = []; | |
var content = wget("http://query.yahooapis.com/v1/public/yql", { |
This file contains hidden or 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
/* appjet:version 0.1 */ | |
import("lib-text-converter"); | |
import("lib-html-xpath"); | |
import("lib-cache"); | |
function jottit(pageName) { | |
var c = new Cache(); | |
//c.deleteOne(pageName); | |
var data = c.get(pageName); |