I hereby claim:
- I am chaitanyagupta on github.
- I am chaitanyagupta (https://keybase.io/chaitanyagupta) on keybase.
- I have a public key ASC2IGaOUZI3T5g9aPkl0_8azN9kb0BGarsb8iQbll54gAo
To claim this, I am signing this object:
;;; mbox parser in Common Lisp | |
;; needs cl-mime and cl-base64 | |
;; (ql:quickload :cl-mime) | |
;; (ql:quickload :cl-base64) | |
;; | |
;; Example: returns all emails in an mbox (as CL-MIME:MIME objects) | |
;; | |
;; (with-open-file (in #p"/path/to/mbox") | |
;; (let ((p (make-parser :stream in))) | |
;; (loop for mime = (next-mime p) |
I hereby claim:
To claim this, I am signing this object:
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-17906056-1', { 'userId': '<snipped>','clientId': '<snipped>' }); | |
ga('set', 'dimension1', '<snipped>'); | |
ga('send', 'pageview', '/VPV/LI/Overview/MyView/Dashboard');</script> |
WARNING These steps are probably out dated and will not work.
To re-sign an iOS app with another developer account, ensure that the following are in place first.
Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier
from one account can't be used in a different account, even though the team id/prefix would be different.
Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
// pj_str.c | |
// Some memory tests around pj_str_t | |
// | |
// To compile, | |
// | |
// $ gcc -g -I$PJSIP/pjlib/include -L$PJSIP/pjlib/lib -lpj-i386-apple-darwin12.5.0 -o pj_str pj_str.c | |
// | |
// And then run ./pj_str | |
// | |
// Check memory leaks using valgrind: |
;;; Usage (percentage (analyze-systems '(a b c d))) => 42.23 | |
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(when (asdf:find-system :named-readtables nil) | |
(asdf:load-system :named-readtables))) | |
(defun analyze-form (form) | |
(typecase form | |
(symbol | |
(when (eql (symbol-package form) (find-package 'cl)) |
var findItem = function(jid, items){ | |
for(var i = 0; i < items.length; ++i){ | |
var item = items[i]; | |
if(item.jid === jid){ | |
return item; | |
} | |
} | |
return null; | |
} |
(defun squash-log-newlines () | |
"Squash wrapped log lines back to their original single line format." | |
(interactive) | |
(end-of-line) | |
(let ((search-str "[2010-01") | |
(start-marker (make-marker)) | |
(end-marker (make-marker))) | |
(set-marker start-marker (point)) | |
(search-forward search-str) | |
(set-marker end-marker (- (point) (1+ (length search-str)))) |