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
(function() { | |
var pocketButton = document.querySelector('.read.selected .icon-fx-pocket-ios-md-black'); | |
if (!pocketButton) return false; | |
pocketButton.click(); | |
})(); |
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
use "peco" | |
HOME = nyagos.env.HOME or nyagos.env.USERPROFILE | |
CACHE_DIR = nyagos.pathjoin(nyagos.env.APPDATA, "NYAOS.ORG") | |
LOCAL_REPOS_DIR = nyagos.env.LOCAL_REPOS_DIR or nyagos.pathjoin(HOME, "repos") | |
-- make the cache directory if it does not exists | |
if not nyagos.access(CACHE_DIR, 0) then | |
nyagos.eval("mkdir -p \""..CACHE_DIR.."\"") | |
end |
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
git clone http://luajit.org/git/luajit-2.0.git | |
cd luajit-2.0 | |
git checkout v2.0.4 | |
make PREFIX=/opt/mingw64/luajit-2.0.4 | |
make install PREFIX=/opt/mingw64/luajit-2.0.4 | |
mkdir /opt/mingw64/luajit-2.0.4/bin/lua | |
mv /opt/mingw64/luajit-2.0.4/{share/luajit-2.0.4/jit/,bin/lua/jit/} |
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
nyagos.completion_hook = function (c) | |
-- gibo | |
if c.text:match('^gibo ') then | |
local list = {}; | |
for i in nyagos.eval('gibo -l'):gmatch('\r?\n[^=\r\n]+') do | |
i = i:gsub('\r?\n', '') | |
table.insert(list, i); | |
end | |
return list; |
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 toMyFont | |
// @namespace https://twitter.com/hami_jpn | |
// @version 1.0.0 | |
// @description Webページのフォントを種別毎に自分の好きなフォントに変更します。 | |
// @author hami_jpn | |
// @include http://* | |
// @include https://* | |
// @grant GM_xmlhttpRequest | |
// @run-at document-body |
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
link-color($link, $visited = $link, $focus = $link, $hover = $focus, $active = $link, $merge = true) | |
$state-array = link visited focus hover active | |
if $merge | |
$same-colors = {} | |
for $state in $state-array | |
$color = lookup('$' + $state) | |
$i = '' + $color | |
$selector = '&:' + $state | |
if $same-colors[$i] |
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
var fs = require('fs'), | |
path = require('path'), | |
async = require('async'), | |
stylus = require('stylus'), | |
jeet = require('jeet'), | |
rupture = require('rupture'), | |
autoprefixer = require('autoprefixer-stylus'); | |
var write_file = hexo.util.file2.writeFile; | |
var mkdirs = hexo.util.file2.mkdirs; |
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
var fs = require('fs'); | |
var yaml = require('js-yaml'); | |
var _type = Object.prototype.toString; | |
var isObject = function(variable) { | |
return variable !== null && _type.call(variable) === '[object Object]'; | |
}; | |
var toObjectNode = function(nodes, data) { | |
if (isObject(data)) { |
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
var fs = require('fs'); | |
var glob = require('glob'); | |
var path = require('path'); | |
module.exports = function() { | |
return function(style) { | |
var nodes = this.nodes; | |
var d = path.dirname(style.evaluator.filename); | |
style.define('files-path', function(p) { | |
var files = new nodes.Object(); |
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
var fs = require('fs'); | |
var parser = require('xml2js').parseString; | |
module.exports = function() { | |
return function(style) { | |
style.define('svg-size', function(p) { | |
var xml, size = new Array(2); | |
try { | |
xml = fs.readFileSync(p.val, 'utf8'); | |
} catch (e) { |
NewerOlder