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
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 |
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 image = {thumbnail: "/path/to/thumbnail", caption: "My really awesome image"} | |
$('thingtoactivateon').click(function() { | |
$($('#photoDetailsEdit').render(image)).dialog() | |
}) |
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
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGSEGV | |
[[Backtrace]] | |
0 rake 0x0000000100054a50 _ZN8rubiniusL12segv_handlerEi + 160 | |
1 libsystem_c.dylib 0x00007fff90242cfa _sigtramp + 26 | |
2 rake 0x00000001001f86ba _ZN8rubinius11CodeManager12add_resourceEPNS_12CodeResourceE + 74 | |
3 rake 0x000000010005defb _ZN8rubinius11InlineCache11empty_cacheEPNS_2VMEPS0_PNS_9CallFrameERNS_9ArgumentsE + 91 | |
4 rake 0x0000000100068597 _ZN8rubinius8VMMethod11interpreterEPNS_2VMEPS0_PNS_20InterpreterCallFrameE + 5447 |