Skip to content

Instantly share code, notes, and snippets.

View legumbre's full-sized avatar

Leonardo Etcheverry legumbre

  • GlamST / Ulta
  • Montevideo, Uruguay
View GitHub Profile
/*
MozRepl setup for Conkeror and firefox-x11-devel-standalone
Reference:
http://conkeror.org/MozRepl -- Conkeror Wiki
https://github.com/bard/mozrepl/wiki -- MozRepl Wiki
https://github.com/bard/mozrepl/wiki/Use-with-Conkeror
*/
// 1. download [email protected] in ~/conkeror/extensions/
;; Parenscript example
;;; /tmp/foo.lisp
(defun foo-bar-baz ()
"foo bar baz"
(mapcar (lambda (x) (+ 1 x)) (list 1 2 3)))
;; compile foo.lisp to foo.js
(with-open-file (stream "/tmp/foo.js" :direction :output :if-exists :supersede)
(format stream (ps-compile-file "/tmp/foo.lisp")))
# installing a device family on quartus (tested on quartus 11.0 for linux)
# install Cyclone III support
./quartus_sh --qinstall -qda "/path/to/devices/subscription/cycloneiii.qda" -show_qt_progress
;; ---------- Objective-C
;; load objc-mode for objective-C header files
(add-to-list 'magic-mode-alist
`(,(lambda ()
(and (string= (file-name-extension buffer-file-name) "h")
(re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t)))
. objc-mode))
;; ---------- Objective-C
;; load objc-mode for objective-C header files
(add-to-list 'magic-mode-alist
`(,(lambda ()
(and (string= (file-name-extension buffer-file-name) "h")
(re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t)))
. objc-mode))
;;set .m <-> .h correspondence for ff-find-other-file
(add-hook 'objc-mode-hook
;; Objective-C
;; load objc-mode for Objective-C header files
(add-to-list 'magic-mode-alist
`(,(lambda ()
(and (string= (file-name-extension buffer-file-name) "h")
(re-search-forward "@\\<interface\\>"
magic-mode-regexp-match-limit t)))
. objc-mode))
;;set .m <-> .h correspondence for ff-find-other-file
function Ring:disconnect_ring(other_ring)
local mapEntry= self.other_rings[other_ring]
local tangent= mapEntry.tangent
klog.debug("DISCONNECTING %s(%s) -> %s(%s) ", self.id, tostring(self), other_ring.id, tostring(other_ring), tostring(mapEntry.tangent))
if not mapEntry then
log.warning("Trying to disconnect %d from %d but no previous connection existed", self.id, other_ring.id)
end
self.other_rings[other_ring]= nil -- other_ring is not mapped anymore
(require 'url)
(let ((url-request-method "POST")
(url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded")))
(url-request-data "field1=Hello&field2=from&field3=Emacs"))
(with-current-buffer (url-retrieve-synchronously "http://example.net/foo/bar") (buffer-string))) ;; C-x C-e here to POST
;; X looks
(setq initial-frame-alist
'((menu-bar-lines . 0)
(tool-bar-lines . 0)
(horizontal-scroll-bars . nil)
(vertical-scroll-bars . nil)
(foreground-color . "bisque2")
(background-color . "dark slate gray")
(cursor-color . "orange")
(mouse-color . "dark slate gray")
2: [ [ 3, 3, 3 ]
[ 1, 2, 3 ]
[ 4, a, c ] ]
;; V D
1: 6 c + 36 + 3 a - 24 - 9 a - 3 c