* is Unix
Jacob Kaplan-Moss
October 7, 2009
OneFileCMS is just that. It's a flat, light, one file CMS (Content Management System) entirely contained in an easy-to-implement, highly customizable, database-less PHP script.
Coupling a utilitarian code editor with all the basic necessities of an FTP application, OneFileCMS can maintain a whole website completely in-browser without any external programs. Screenshots
* Validating, semantic, and commented markup. Tested in FF, Safari, and IE7/IE8.
* Small footprint (20.4 kb)
* Possibly the easiest installation process ever
* All the basic features of an FTP application like renaming, deleting, copying, and uploading
uploads/deletions, you're going to want to break out an actual FTP program.)
* Gracefully degrading CSS and Javascript
* 100% re-brandable with page title stored in variable and a modifiable filename
Requirements
* UNIX/Linux host, Apache
* PHP5 (PHP4 untested)
* File permission privileges
JSON ... it's the intersection of all modern programming languages. All languages have some sense of data, and structures of data. They all have simple values like number strings, and booleans. They all have some sense of a sequence of values. ... Every language has some sense of a collection of named values; it might be an object, or a record, or a struct, or a hash, or a property list, or something. All languages have these, these are universal ideas.
... But they all have the same idea about what the data looks like, and JSON has the thing that's common to everything. By being at the intersection, it turns out to be the thing that everybody can agree on, so it's really easy to pass data back and forth.
Prior data interchange formats tended to try to be the union of all the languages, and that turns out to be horrendously complex, and very difficult to deal with. JSON, by being so simple, actually became really easy to use.
....nolist ; We don't want to actually include defs in our listing file. .include "m168def.inc" ; m168def.inc defines all the pins on the Mega168 so we can ; use them by their names rather than addresses (not fun). .list ; We DO want to include the following code in our listing ;D rjmp main ; You usually place these two lines after all your main: ; directives. They make sure that resets work correctly. ldi r16,0xFF ; LoaD Immediate. This sets r16 = 0xFF (255) out DDRB,r16 ; Out writes to SRAM, which is one way of accessing ; pins. DDRB controls PORTB's in/out state. ldi r16,0x00 ; r16 is where we'll store current LED state ; 0x00 means all off. This is preserved over loops.
; LEDblink.asm - M. Covington 2006
; For ATtiny13.
; Blinks the LEDs attached to PB0 and PB1.
.include "tn13def.inc"
.def temp = R16
.def temp1 = R17
.def temp2 = R18
.def mask = R19
start: ldi temp,0b00000010
out PORTB,temp ; initialize port B
ser mask
out DDRB,mask ; port B all outputs
blink:
; Delay 0.1 sec (1.2 MHz)
ldi temp1,200 ; outer loop count
L1: ldi temp2,199 ; inner loop count
L2: dec temp2
brne L2
dec temp1
brne L1
; Toggle PB0 and PB1
ldi mask,0b00000011
eor temp,mask
out PORTB,temp
rjmp blink
; End of program
(defun eval. (e a)
(cond
((atom e) (assoc. e a))
((atom (car e))
(cond
((eq (car e) 'quote) (cadr e))
((eq (car e) 'atom) (atom (eval. (cadr e) a)))
((eq (car e) 'eq) (eq (eval. (cadr e) a)
(eval. (caddr e) a)))
((eq (car e) 'car) (car (eval. (cadr e) a)))
((eq (car e) 'cdr) (cdr (eval. (cadr e) a)))
((eq (car e) 'cons) (cons (eval. (cadr e) a)
(eval. (caddr e) a)))
((eq (car e) 'cond) (evcon. (cdr e) a))
('t (eval. (cons (assoc. (car e) a)
(cdr e))
a))))
((eq (caar e) 'label)
(eval. (cons (caddar e) (cdr e))
(cons (list (cadar e) (car e)) a)))
((eq (caar e) 'lambda)
(eval. (caddar e)
(append. (pair. (cadar e) (evlis. (cdr e) a))
a)))))