Skip to content

Instantly share code, notes, and snippets.

Marduk Bolaños mardukbp

  • Mexico City
Block or report user

Report or block mardukbp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c309505f97340a041f0a342a12b567aa java.lang.RuntimeException: java.lang.NullPointerException
mardukbp / gist:59a1cac1379d0d112a47
Last active Aug 29, 2015
Compilation of poppler 0.13 fails
View gist:59a1cac1379d0d112a47
$ cabal install hoodle
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /tmp/poppler-0.13-24093/poppler-0.13/SetupWrapper.hs, /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/SetupWrapper.o )
/tmp/poppler-0.13-24093/poppler-0.13/SetupWrapper.hs:118:28: Warning:
In the use of ‘configCompiler’
(imported from Distribution.Simple.Configure):
Deprecated: "'configCompiler' is deprecated. Use 'configCompilerEx' instead."
[2 of 2] Compiling Main ( /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/setup.hs, /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/Main.o )
Linking /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/setup ...
mardukbp /
Created Nov 8, 2013
Calculate the exponential of a square matrix using the algorithm in Leonard, I. E., SIAM Rev. (38), 507, 1996.
def matExp(A):
Return the matrix exponential of A using the algorithm in
Leonard, I. E., SIAM Rev. (38), 507, 1996.
n = A.rows
M = []
for i in range(n):
mardukbp / bibtex2ebib.js
Created Sep 16, 2013
Export citation in bibtex format from Conkeror to ebib
View bibtex2ebib.js
function ebib_import_bibtex (url) {
var cmd_str = 'emacsclient -ne \'(ebib-import-bibtex \"' + url + '\")\'';
interactive("bibtex2ebib", "Download PDF and add bibtex entry for current preprint to ebib",
function (I) {
mardukbp / ebib-import-bibtex.el
Created Sep 16, 2013
Import citation in bibtex format from journal's website to ebib
View ebib-import-bibtex.el
(require 'mm-url)
(defun ebib-import-bibtex (url)
(let ((tempbuff (get-buffer-create "*bibtex*")))
(with-current-buffer tempbuff
(mm-url-insert-file-contents url)
(kill-buffer (current-buffer))
mardukbp / ebib-attach-file.el
Created Sep 16, 2013
Attach PDF from ebib to email in mu4e/gnus
View ebib-attach-file.el
(defun ebib-attach-file ()
"Attach file to gnus/mu4e composition buffer"
(let ((filename (to-raw (car (ebib-get-field-value ebib-standard-file-field
(edb-cur-entry ebib-cur-db))))))
(if filename
(ebib-dired-attach filename)
mardukbp / ebib-filter-n-days.el
Last active Dec 23, 2015
Filter recently added entries in ebib UPDATED (Sep. 16 2013)
View ebib-filter-n-days.el
(defun ebib-filter-n-days (n)
"Filter entries added in the last n days"
(let* ((field (intern-soft "timestamp"))
(day-of-year (string-to-number (format-time-string "%j")))
(n-days-ago (- day-of-year (- n 1)))
(days-between (number-sequence n-days-ago day-of-year))
(regexp-days-between (mapconcat #'(lambda (x)
(concat "\\(" (number-to-string x) "d\\)"))
days-between "\\|")))
mardukbp / conkeror-arxiv2ebib.js
Created Sep 15, 2013
Zotero-like arXiv integration for Conkeror with ebib
View conkeror-arxiv2ebib.js
function ebib_import_arxiv (url) {
var cmd_str = 'emacsclient -ne \'(ebib-import-arxiv \"' + url + '\")\'';
interactive("arxiv2ebib", "Download PDF and add bibtex entry for current preprint to ebib",
function (I) {
mardukbp / ebib-import-arxiv.el
Last active Dec 23, 2015
Zotero-like arXiv integration for ebib UPDATED (Sep. 16 2013)
View ebib-import-arxiv.el
(setq arxiv-dir "~/Papers/arxiv/")
(defun ebib-import-arxiv (arxiv-url)
(let ((tempbuff (get-buffer-create "*arxiv*"))
(arxiv-id (car (cdr (split-string arxiv-url "abs/"))))
(arxiv-pdf-url (concat (replace-regexp-in-string "abs" "pdf" arxiv-url) ".pdf")))
(call-process-shell-command "" nil tempbuff nil arxiv-id)
mardukbp / ebib-delete-filter.el
Created Sep 11, 2013
Delete saved filter in ebib
View ebib-delete-filter.el
(defun ebib-delete-filter ()
(let ((filter-name (completing-read (format "Choose a saved filter: ")
(mapcar #'(lambda(x)
(cons x 0))
nil t)))
You can’t perform that action at this time.