This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmessage draw ((engine =test-engine=)) | |
(declare (ignore engine)) | |
(dotimes (i 100) | |
(draw (clone (=component=) | |
((x (random 400)) | |
(y (random 400)) | |
(width 10) | |
(height 10)))))) | |
;; 22fps from this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* latest_github_commits.php | |
* Dumps a github commit report. | |
*/ | |
/** | |
* Dump a report of the latest commits for a github repo. | |
* | |
* @param string $owner Account name that owns the repo in question. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Sat, 02 Jan 2010 21:47:53 GMT] [error] [<0.757.0>] ** Generic server couch_query_servers terminating | |
** Last message in was {'EXIT',<0.769.0>, | |
{{try_clause, | |
<<"Cannot encode 'undefined' value as JSON">>}, | |
[{couch_query_servers,os_reduce,3}, | |
{couch_query_servers,reduce,3}, | |
{couch_view_group,'-init_group/4-fun-0-',4}, | |
{couch_btree,'-write_node/3-lc$^0/1-0-',3}, | |
{couch_btree,write_node,3}, | |
{couch_btree,modify_node,4}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/irc/channel.cpp b/src/irc/channel.cpp | |
index 0706767..23ee0bb 100644 | |
--- a/src/irc/channel.cpp | |
+++ b/src/irc/channel.cpp | |
@@ -124,11 +124,11 @@ void Channel::sendNames(Nick* nick) const | |
string names; | |
for(vector<ChanUser*>::const_iterator it = users.begin(); it != users.end(); ++it) | |
{ | |
- if(!names.empty()) | |
- names += " "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URxvt*color0: #000000 | |
URxvt*color1: #9e1828 | |
URxvt*color2: #aece92 | |
URxvt*color3: #968a38 | |
URxvt*color4: #414171 | |
URxvt*color5: #963c59 | |
URxvt*color6: #418179 | |
URxvt*color7: #bebebe | |
URxvt*color8: #666666 | |
URxvt*color9: #cf6171 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *key-derivation-iterations* 1056) | |
(defparameter *key-length* 32) | |
(defun hash-password (password salt) | |
"Password hashing function." | |
(ironclad:byte-array-to-hex-string | |
(ironclad:derive-key | |
(make-instance 'ironclad:pbkdf2 :digest :sha256) | |
(ironclad:ascii-string-to-byte-array password) | |
(ironclad:ascii-string-to-byte-array salt) | |
*key-derivation-iterations* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass account-name-field (email-field required-field) ()) | |
(defmethod validate-field :after ((field account-name-field) account-name) | |
(check-field (not (find-account-by-email account-name)) | |
"Account already exists.")) | |
(defclass account-password-field (password-field required-field) ()) | |
(defmethod validate-field :after ((field account-password-field) password) | |
(check-field (and (>= (length password) 6) | |
(every #'standard-char-p password)) | |
"Password must be at least 6 characters long and can't contain funky characters.")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Valid names: | |
a/the little teapot | |
a/the little, short, and stout teapot | |
John Doe | |
Godot | |
Supreme Commander John Doe | |
Count Chocula | |
a/the captain of the guard | |
a/the male servant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun test-names () | |
(flet ((test-case (expected modifier-alist) | |
(unwind-protect | |
(let ((e (create-entity :comment expected))) | |
(unwind-protect | |
(loop for (name . value) in modifier-alist | |
do (add-modifier e name value) | |
finally (assert (string= (full-name e) expected) () | |
"Full name was ~S" (full-name e))) | |
(with-db () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun git-grep (regexp) | |
(interactive "sSearch in git repo: ") | |
(grep (format "GIT_PAGER='' git grep -nH --no-color -i \"%s\" -- $(git rev-parse --show-toplevel)" regexp))) | |
(global-set-key (kbd "C-x ?") 'git-grep) |