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
| require "iniparse" | |
| document = IniParse.parse(File.read(".gitmodules")) | |
| document.each do |line| | |
| desc "git-pull #{line.key}" | |
| task line["path"] do | |
| cd line["path"] do | |
| sh "git pull" do |ok, res| | |
| if ok | |
| sh "git log HEAD@{1}..HEAD --reverse --oneline" | |
| 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
| class Foo: | |
| def getattr(self, arg): | |
| def x(): | |
| return "good" | |
| return getattr(self, arg, None) | |
| def x(self): | |
| return "bad" | |
| f = Foo() |
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
| from keyhac import * | |
| import itertools | |
| """ | |
| enthumble for keyhac | |
| ==================== | |
| enthumble_ 多機能バージョンのキーマップをkeyhacで再現してみる。 | |
| 実装状況 |
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
| from keyhac import * | |
| import pyauto | |
| def cuteExec(filename, param=u"", directory=u"", classname=u""): | |
| def _cuteExec(): | |
| window = pyauto.Window.find(classname, None) | |
| if window: | |
| if window.isMinimized(): | |
| window.sendMessage(pyauto.WM_SYSCOMMAND, pyauto.SC_RESTORE) | |
| window.setForeground(True) |
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
| // Util {{{1 | |
| let toggleDisplay = function (elem) elem && (elem.style.display = ((elem.style.display == "none")? "": "none")); | |
| let Logger = libly.$U.getLogger("pixiv_tools.js"); | |
| let $ = function (a) window.content.document.getElementById(a); | |
| let $LX = function (a, b) libly.$U.getFirstNodeFromXPath(a, b); | |
| let $LXs = function (a, b) libly.$U.getNodesFromXPath(a, b); | |
| let toQuery = function (so) [encodeURIComponent(i) + "=" + encodeURIComponent(so[i]) for (i in so)].join("&"); | |
| let checkInput = function (input) commandline.close() || (input && /^y(es)?/i.test(input)); | |
| // }}}1 |
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
| liberator.plugins.Block = function () { | |
| let mTabs = Array.filter(config.tabbrowser.mTabs, function (aNode) aNode.localName == "tab"); | |
| let mCurrentIndex = tabs.index(); | |
| let identify = function (i) {try{return i.linkedBrowser.contentDocument.location.host}catch(e){}}; | |
| let tabBlocks = [], activeBlockIndex, cache; | |
| mTabs.forEach(function (aTab) { | |
| let id = identify(aTab); | |
| if (cache != id && !TreeStyleTabService.getParentTab(aTab)) { | |
| tabBlocks.push([]); | |
| cache = id; |
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
| // Echo Statusline-field-url {{{ | |
| // ステータスバーを隠している時に、URL表示を確認する | |
| mappings.addUserMap( | |
| [modes.NORMAL], ['<C-g>'], | |
| 'Print the current url status', | |
| function () liberator.echo(statusline._urlWidget.value), | |
| {} | |
| ); | |
| // }}} |
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
| diff --git a/bartab-integration.js b/bartab-integration.js | |
| index 3878e46..69b5c55 100644 | |
| --- a/bartab-integration.js | |
| +++ b/bartab-integration.js | |
| @@ -38,7 +38,7 @@ function barTap_bufferCompletion (context) { | |
| <span highlight="Indicator" style="display: inline-block; width: 2em; text-align: center">{item.item.indicator}</span> | |
| { process.call(this, item, text) } | |
| </>]; | |
| - context.completions = util.map(tabs.browsers, function ([i, browser]) { | |
| + context.completions = util.map(util.Array.iteritems(gBrowser.mTabs), function ([i, browser]) { |
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
| // 次の未読タブへ移動 {{{ | |
| // @http://gist.github.com/433387 | |
| (function(){ | |
| if (liberator.plugins.browser_object_api) { | |
| [ | |
| [ | |
| ['gj', 'sj'], 'Go to the next tab *loaded*.', | |
| function (count) { | |
| tabs.select( | |
| ( |
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
| // :evernote --- Post Evernote {{{ | |
| if (liberator.hasExtension("Evernote Web Clipper")) | |
| commands.addUserCommand(["ev[ernote]"], "Post Evernote", evernote_addToEn3, {}, true); | |
| // }}} |