Skip to content

Instantly share code, notes, and snippets.

@don9z
don9z / gist:5945914
Created July 8, 2013 02:55
Workaround for this error: ad-Advice-package--add-to-archive-contents: Symbol's function definition is void: package-desc-vers
;; diff --git a/melpa-autoloads.el b/melpa-autoloads.el
(defadvice package--add-to-archive-contents (around package-filter-add-to-archive-contents (package archive) activate compile) "\
Add filtering of available packages using `package-filter-function',
-if non-nil." (when (and package-filter-function (funcall package-filter-function (car package) (package-desc-vers (cdr package)) archive)) ad-do-it))
+if non-nil." (when (and package-filter-function (funcall package-filter-function (car package) (package--ac-desc-version (cdr package)) archive)) ad-do-it))
;; diff --git a/melpa.el b/melpa.el
@@ -84,7 +84,7 @@ if non-nil."
@peccu
peccu / gist:3608020
Created September 3, 2012 09:07
twittering-modeのうち,つぶやく部分だけを呼び出す.必要に応じてoauth認証もする
(require 'twittering-mode)
(defun tweet()
(interactive)
(when
(twittering-ensure-preparation-for-api-invocation)
(twittering-update-status-from-pop-up-buffer)))
(global-set-key (kbd "C-c C-s") 'tweet)
@buzztaiki
buzztaiki / gist:1964794
Created March 3, 2012 07:03
el-get, elpa, emacsmirror, emacswikiをまとめてドン
(list
:el-get (el-get-read-all-recipe-names)
:elpa
(progn
(package-refresh-contents)
(loop for pkg in package-archive-contents
collect (symbol-name (car pkg))))
:emacsmirror
(with-temp-buffer
(call-process
@mooz
mooz / anything-c-source-bm-global.el
Created January 15, 2012 14:30
anything-c-source-bm-global
(require 'cl)
(defvar anything-c-source-bm-global
'((name . "Global Bookmarks")
(init . anything-c-bm-global-init)
(candidates-in-buffer)
(type . global-bm))
"Bookmarks exist in `bm-repository'.")
(define-anything-type-attribute 'global-bm
@mooz
mooz / hok-settings.js
Created December 24, 2011 07:52
HoK Settings
plugins.options["hok.actions"] = [];
plugins.options["hok.actions"].push(
['g',
"Inspect element in Firebug",
function (elem) { Firebug.Inspector.inspectFromContextMenu(elem); },
false, false, "*"]
);
plugins.options["hok.actions"].push(
['m',
"Open context menu",
@teramako
teramako / pdf-js.js
Created December 9, 2011 16:54
[Vimperator-plugin]pdf-js mappings
/*
* for pdf.js
* @see https://github.com/mozilla/pdf.js
*
* == Mappings ==
* {count}<C-j> : go next page
* {count}<C-k> : go previous page
* go : go to {num} page
* {count}zz : zoom {count} % or 100%(if ommit)
* zw : zoom page width
@m2ym
m2ym / .xkeyremap
Created November 17, 2011 12:47
My xkeyremap configuration
#-*-ruby-*-
device /AT Translate|HHKB/
key C-M-S-q { quit }
# swap number keys
key[_1] = exclam, _1
key[_2] = at, _2
key[_3] = numbersign, _3
@958
958 / gist:1068696
Created July 7, 2011 00:53
[keysnail]サムネイル付きタブ一覧を表示する & XULMigemoる
// http://www.lifehacker.jp/2011/06/110622_listalltabsthumbs.html
// をしなくても、以下のようなキーバインドを割り当てればタブ一覧が表示される
key.setViewKey('A', function (ev, arg) {
allTabs.open();
}, 'タブを一覧表示', true);
// ついでに、上記で表示されるタブ一覧と、Ctrl+Shift+e で表示されるタブグループ一覧(?)で
// タブ検索を XULMigemoる
// これは %PRESERVE% エリアへ
(function(){
@958
958 / disable_github_keyboard_shortcuts.user.js
Created April 28, 2011 07:43
github のキーボードショートカットを殺す Greasemonkey Script
// ==UserScript==
// @name Disable github keyboard shortcuts
// @namespace http://sites.google.com/site/958site/
// @description github のキーボードショートカットを殺す
// @include https://github.com/*
// @include https://gist.github.com/*
// ==/UserScript==
unsafeWindow.$(document).unbind('keydown');
@958
958 / .keysnail.js
Created April 28, 2011 05:12
[keysnail] vimperator の C-^ みたいな
if (typeof gBrowser !== 'undefined' && gBrowser.tabContainer) {
let prev = gBrowser.tabContainer.selectedIndex;
let cur = prev;
gBrowser.tabContainer.addEventListener("TabSelect", function(){
prev = currentSelectedTabIndex;
cur = gBrowser.tabContainer.selectedIndex;
}, false);
ext.add("toggle-selected-tab", function () gBrowser.tabContainer.selectedIndex = prev, '選択タブをトグルする');
}