Skip to content

Instantly share code, notes, and snippets.

View nicferrier's full-sized avatar

Nic Ferrier nicferrier

View GitHub Profile
(defun twaddle-log (con hdr data)
(with-current-buffer (get-buffer-create "*twitter-log*")
(insert (format "%s %S %s\n" con hdr data))))
;; OAuth header and signature implementation
(defun* twaddle|oauth1-header-do (url &key http-params method oauth-token)
"Private function implementing oauth header construction."
(let* ((oauth-params
`(("oauth_consumer_key" . ,twaddle-consumer-key)
- timer-event-handler 39716 90%
- byte-code 39704 90%
- apply 39704 90%
- sp-show--pair-function 39356 89%
- sp-get-thing 39354 89%
- sp-get-sexp 39322 89%
- sp-get-paired-expression 39318 89%
- sp--get-string-or-comment-bounds 39318 89%
- sp-get-quoted-string-bounds 39318 89%
- syntax-ppss 39023 89%
(defun nic-dyn-lookup (symbol)
(format "%S" (symbol-value (intern symbol))))
(defun nic-lex-lookup (symbol environment)
(let ((value (assq (intern symbol) (cadr environment))))
(when (consp value) (format "%S" (cdr value)))))
(defmacro s-lex-format (template)
(if lexical-binding
(let ((str "in my craft and sullen art"))
(save-match-data
(string-match "\\(in\\) my craft" str))
(let ((str2 (concat "" str)))
(string-match "thing1" str2)
(match-string 1 str2)))
;;; elnode-proxy.el -- proxying with elnode -*- lexical-binding: t -*-
(require 's)
(require 'web)
(defun elnode/web->elnode-hdr (hdr httpcon)
(apply
'elnode-http-start
httpcon 200
(mapcar
(require 'ert)
(require 'elwiki)
(require 'fakir)
(ert-deftest elwiki/render-page ()
"Test `elwiki/render-page'."
(fakir-mock-process :httpcon ()
(let ((elwiki-wikiroot "/path/to/wikiroot/")
(test-file-contents "= Test page =\nthis is a test wiki page\n")
(output ""))
anaphora-0.1.0
ascii-3.1
auto-complete-1.4
back-button-0.6.4
bigint-1.0.0
browse-kill-ring-1.3.1
cl-lib-0.2
clojure-mode-2.1.0
color-theme-6.5.5
color-theme-dawn-night-1.0
#include <stdio.h>
int
main (char** argv, int argc)
{
char ch = fgetc(stdin);
while (!feof(stdin)) {
write(ch);
ch = fgetc(stdin);
}
(defun my-package-complete ()
(customize-set-variable
'package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
))
(customize-save-customized)
(package-refresh-contents)
(defun my-package-complete ()
(require 'package)
(customize-set-variable
'package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
))
(customize-save-customized)