Skip to content

Instantly share code, notes, and snippets.

View mgalgs's full-sized avatar
🍔
pizza

Mitchel Humpherys mgalgs

🍔
pizza
View GitHub Profile
>>> import dbus
>>> bus = dbus.SessionBus()
>>> obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
>>> purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
>>> purple.PurpleSavedstatusGetCurrent()
dbus.Int32(379)
>>> purple.PurpleAccountsGetAllActive()
dbus.Array([dbus.Int32(196)], signature=dbus.Signature('i'))
(setq demo-options
'("Stuff"
"things"
("Custom" . (lambda () (read-from-minibuffer "Custom: ")))))
(defun demo-select (el)
(cond
((functionp el)
(funcall el))
(t
Debugger entered--Lisp error: (arith-error)
%(2 0)
(search-backward "\n" nil t (% (line-number-at-pos) helm-swoop-last-prefix-number))
(progn (search-backward "\n" nil t (% (line-number-at-pos) helm-swoop-last-prefix-number)) (goto-char (point-at-bol)))
(make-overlay (progn (search-backward "\n" nil t (% (line-number-at-pos) helm-swoop-last-prefix-number)) (goto-char (point-at-bol))) (save-excursion (goto-char (point-at-bol)) (or (search-forward "\n" nil t helm-swoop-last-prefix-number) (point-max))))
(setq helm-swoop-line-overlay (make-overlay (progn (search-backward "\n" nil t (% (line-number-at-pos) helm-swoop-last-prefix-number)) (goto-char (point-at-bol))) (save-excursion (goto-char (point-at-bol)) (or (search-forward "\n" nil t helm-swoop-last-prefix-number) (point-max)))))
(overlay-put (setq helm-swoop-line-overlay (make-overlay (progn (search-backward "\n" nil t (% (line-number-at-pos) helm-swoop-last-prefix-number)) (goto-char (point-at-bol))) (save-excursion (goto-char (point-at-bol)) (o
@mgalgs
mgalgs / gist:7044983
Created October 18, 2013 17:31
gnome update breaks emacs
Backtrace:
emacs[0x4f719b]
emacs[0x4dcc4e]
emacs[0x4f5dee]
emacs[0x4f5f53]
/usr/lib/libpthread.so.0(+0xf870)[0x7f7c11869870]
/usr/lib/libc.so.6(getenv+0xad)[0x7f7c114e653d]
/usr/lib/libc.so.6(+0x30009)[0x7f7c114df009]
/usr/lib/libgtk-3.so.0(+0x18173a)[0x7f7c163da73a]
/usr/lib/libgobject-2.0.so.0(g_type_class_ref+0x4ae)[0x7f7c1529186e]
diff --git a/magit.el b/magit.el
index 209418a..bbcabbc 100644
--- a/magit.el
+++ b/magit.el
@@ -5237,7 +5237,7 @@ Return nil if there is no rebase in progress."
(cons (concat "refs/heads/" branch)
magit-uninteresting-refs)
magit-uninteresting-refs))))
- (magit-run-git "rebase" (magit-rev-to-git rev)))))
+ (magit-run-git "rebase" "--autosquash" "--autostash" (magit-rev-to-git rev)))))
diff --git a/magit.el b/magit.el
index 209418a..bbcabbc 100644
--- a/magit.el
+++ b/magit.el
@@ -5237,7 +5237,7 @@ Return nil if there is no rebase in progress."
(cons (concat "refs/heads/" branch)
magit-uninteresting-refs)
magit-uninteresting-refs))))
- (magit-run-git "rebase" (magit-rev-to-git rev)))))
+ (magit-run-git "rebase" "--autosquash" "--autostash" (magit-rev-to-git rev)))))
diff --git a/magit.el b/magit.el
index 209418a..bbcabbc 100644
--- a/magit.el
+++ b/magit.el
@@ -5237,7 +5237,7 @@ Return nil if there is no rebase in progress."
(cons (concat "refs/heads/" branch)
magit-uninteresting-refs)
magit-uninteresting-refs))))
- (magit-run-git "rebase" (magit-rev-to-git rev)))))
+ (magit-run-git "rebase" "--autosquash" "--autostash" (magit-rev-to-git rev)))))
lazy-search-menu: Wrong number of arguments: (lambda (title info-alist &optional miss-match-exit-p recursion-p protect-function alternate-function execute-last-command-when-miss-match) "One key menu.
`TITLE' is the title of menu, can use any string.
`INFO-ALIST' is a special alist
that contains KEY, DESCRIBE and COMMAND.
`MISS-MATCH-EXIT-P' whether to hide popup help window
when keystroke can't match in menu.
`RECURSION-P' whether recursion execute self
when keystroke can't match in menu.
`PROTECT-FUNCTION' the protect function
@mgalgs
mgalgs / gist:6394024
Created August 30, 2013 20:36
ipython and optparse
In [1]: from optparse import OptionParser
In [2]: parser = OptionParser()
In [3]: parser.add_option("", "--cpu-state")
Out[3]: <Option at 0x1556fc8: --cpu-state>
In [4]: args = ["--stuff", "--cpu-state"]
In [5]: options, args = parser.parse_args(args)
all:
javac -version