This file contains hidden or 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
(setq shoes-off-config | |
`((:username ,(getenv "rcirc_bouncer_username") | |
:password ,(getenv "rcirc_bouncer_password") | |
:server-alist (("irc.freenode.net" | |
:nick "PuercoPop" | |
:port 6667 | |
:user-name "PuercoPop" | |
:password "NinjaKittens" | |
:full-name "Full Name" | |
:channels ("#emacs" "#lisp" "#limajs" "#python.pe")))))) |
This file contains hidden or 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
(defpattern sdl-event (type key state) | |
`(and (sdl:event-type (type (eq ,type))) | |
(sdl::key-key (key (eq ,key)) ,state))) | |
(setf (fdefinition 'event-typep) #'sdl:key-down-p) | |
(sdl:with-init (sdl:sdl-init-video) | |
(sdl:window 256 240 :bpp 24 :sw t) | |
(sdl:enable-key-repeat 10 10) | |
(unwind-protect (let ((event (sdl:new-event))) |
This file contains hidden or 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
(in-package :famiclom) | |
(require 'sb-sprof) | |
(defun check-for-input () | |
(let ((event (sdl:new-event))) | |
(loop | |
;; Pops the event-queue and binds it to event, return 0 if no pending | |
;; events. | |
:for event-poll = (sdl-cffi::SDL-Poll-event event) |
This file contains hidden or 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
(in-package :famiclom) | |
(defun get-byte-input% (addr) | |
(declare (ignore addr)) | |
(format t "Reading button ~A: ~A~%" (first (pad-strobe *pad*)) (get-state *pad*)) | |
(prog1 (get-state *pad*) | |
(next-state *pad*))) | |
(let ((last-input 0)) |
This file contains hidden or 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 profile! (&optional (mode :time)) | |
(reset *nes*) | |
(load-rom "/home/puercopop/quicklisp/local-projects/famiclom/roms/smb.nes") | |
(sb-sprof:with-profiling (:sample-interval 0.001 | |
:alloc-interval 2 | |
:max-samples 1000 | |
:show-progress t | |
:report :graph | |
:mode :time | |
:reset t) |
This file contains hidden or 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 play-rom (file) | |
(reset *nes*) | |
(load-rom file) | |
(sdl:with-init (sdl:sdl-init-video sdl:sdl-init-audio) | |
(sdl:window 256 240 :bpp 24 :sw t) | |
(sdl:enable-key-repeat 10 10) | |
(sdl:with-events (:poll) | |
(:quit-event () t) | |
(:key-down-event | |
(:key key-pressed) |
This file contains hidden or 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
(in-package :famiclom) | |
;; Launch an sdl-window. After Pressing p, the inputs are polled and | |
;; then. displayed in the window or written to stdout. | |
(defstruct pad | |
(buttons (make-array 8 :element-type 'boolean :initial-element nil)) | |
(strobe '(:a :b :select :start :up :down :left :right)) | |
(index 0 :type fixnum)) ;; Used for strobe method |
This file contains hidden or 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
(in-package :famiclom) | |
;; Launch an sdl-window. After Pressing R, the inputs are polled and | |
;; then. displayed in the window or written to stdout. | |
(defvar *last-key-pressed* nil) | |
(defclass pad () | |
((a :initform nil :accessor button-a |
This file contains hidden or 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
loginButton.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View v) { | |
// First check if email or password are empty, if any of those | |
// is empty, focus them. Else try to authenticate on the | |
// endpoint. | |
final EditText email = (EditText) rootView.findViewById(R.id.login_email); | |
final EditText password = (EditText) rootView.findViewById(R.id.login_password); | |
AuthenticatorMock authenticator = new AuthenticatorMock(); | |
try { |
This file contains hidden or 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
(add-hook 'save-hook (lambda () (shell-command "Youur command")) |