Skip to content

Instantly share code, notes, and snippets.

View nex3's full-sized avatar

Natalie Weizenbaum nex3

  • Google
  • Seattle
View GitHub Profile
;;;###autoload
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
;;;###autoload
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
;;;###autoload
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
;;;###autoload
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(destructuring-bind (login . token) (github-auth-info)
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
(ext (or (cdr (assoc major-mode gist-supported-modes-alist))
(defun gist-region (begin end &optional private)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
With a prefix argument, makes a private paste."
(interactive "r\nP")
(destructuring-bind (login . token) (github-auth-info)
(let* ((file (or (buffer-file-name) (buffer-name)))
(name (file-name-nondirectory file))
(ext (or (cdr (assoc major-mode gist-supported-modes-alist))
data MyList a = Element a (MyList a) | End
myreverse list = myreverse1 list End
myreverse1 (Element head rest) list = myreverse1 rest (Element head list)
myreverse1 End list = list
(custom-set-faces
'(default ((((min-colors 256)) (:foreground "red"))
(t (:foreground "blue")))))
@nex3
nex3 / diff.rb
Created November 29, 2008 05:55
class SymbolicExpression
def inspect
to_s
end
def deriv(v)
self.basic_deriv(v).simplify
end
def +(other)
Sum.new(self,other)
end
(defun test-font-lock-extend-region-function (name)
(interactive "aFunction name: ")
(let ((font-lock-beg (point))
(font-lock-end (mark)))
(when (funcall name)
(setq transient-mark-mode 'lambda)
(goto-char font-lock-beg)
(set-mark font-lock-end))))