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
Proposed API for HTML5 parser in Javascript | |
var HTML5 = require('html5') | |
HTML5.parse(string, [{DOM: domModule}]) -> DOM objects | |
new HTML5.Parser(source, [{DOM: domModule}]) -> eventEmitter with "document" property. emits "end" when fully parsed, and the document property is a DOM tree | |
Internal: |
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
buffer = new Buffer(1024 * 1024); | |
buffer.readFrom(socketA); | |
buffer.writeTo(socketB); | |
... is this sys.pump, with a one megabyte buffer? | |
Make write throw an error when it would block (making sure people handle writes in the wouldblock case, not blocking nor throwing data away) | |
Make an enlargeable buffer for cases where you want the old growing-memory behavior of write() |
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
var http = require('http') | |
var cl = http.createClient(80, 'dinhe.net'); | |
var req = cl.request('POST', '/~aredridel/t.php', | |
{ host: 'dinhe.net', 'Content-Type': 'multipart/form-data; boundary=----asd123' }) | |
req.write('------asd123\r\nContent-Disposition: form-data; name="file"; filename="test.txt"\r\nContent-Type: application/octet-stream\r\n\r\n') | |
req.write("Testing 123\r\n") | |
req.write("------asd123--r\n") | |
req.end() |
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
typetable = Account.reflections[@input.type.intern].table_name | |
@accounts = @accounts.joins(@input.type) | |
@accounts.where(Contact.p(:id)).where( | |
Arel::Nodes::Grouping.new @accounts = [:first, :last, :company, :name].inject(@accounts) { |a,e| | |
Arel::Nodes::Or.new(a, Contact.p(e).matches("%#{@input.q}%")) | |
}) |
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
Index: Classes/PHPExcel/Shared/CodePage.php | |
=================================================================== | |
--- Classes/PHPExcel/Shared/CodePage.php (revision 66289) | |
+++ Classes/PHPExcel/Shared/CodePage.php (working copy) | |
@@ -45,6 +45,7 @@ | |
*/ | |
public static function NumberToName($codePage = '1252') | |
{ | |
+ if($codePage == 0) $codePage = 1252; | |
switch ($codePage) { |
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
core.DOMException = function(code, message) { | |
this._code = code; | |
Error.call(this, core.exceptionMessages[code]); | |
this.message = core.exceptionMessages[code]; | |
if(message) this.message = this.message + ": " + message; | |
if(Error.captureStackTrace) Error.captureStackTrace(this, core.DOMException); | |
}; | |
core.DOMException.prototype = { | |
get code() { return this._code;}, |
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
aredridel@host ~/working ls testsparse | |
-rw-r--r-- 1 aredridel users 1000000001 Apr 24 00:27 testsparse | |
aredridel@host ~/working$ stat testsparse | |
File: `testsparse' | |
Size: 1000000001 Blocks: 32 IO Block: 4096 regular file | |
Device: fd02h/64770d Inode: 2408452 Links: 1 | |
Access: (0644/-rw-r--r--) Uid: ( 500/aredridel) Gid: ( 1000/ users) | |
Access: 2011-04-24 00:26:56.000000000 -0600 | |
Modify: 2011-04-24 00:27:04.000000000 -0600 |
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
var fs = require('fs') | |
var s = fs.createReadStream('x') | |
s.on('data', function(b) { console.log(b) }) |
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
Post | |
+-----+ | |
| | | |
+-----------+-+ | +------------+ | |
+--------------+ | | +-v------------+ | | | |
| | | Register | | | | Logged in | | |
| | | Template | | Do | | Template | | |
| Register | | | | Register | | | | |
| | | | | | | | | |
| | +-------^-----+ | | +--^---------+ |
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
# this file goes in /etc/sysconfig/networking/profiles/default | |
NAME=ppp0 | |
BOOTPROTO=dhcp | |
TYPE=Modem | |
AC=off | |
BSDCOMP=off | |
VJCCOMP=off | |
CCP=off | |
PC=off | |
VJ=off |
OlderNewer