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
--- sbin/sysctl/sysctl.c.orig 2014-04-02 12:54:01.000000000 +0200 | |
+++ sbin/sysctl/sysctl.c 2014-04-02 12:54:33.000000000 +0200 | |
@@ -632,7 +632,7 @@ | |
[CTLTYPE_LONG] = sizeof(long), | |
[CTLTYPE_ULONG] = sizeof(u_long), | |
[CTLTYPE_S64] = sizeof(int64_t), | |
- [CTLTYPE_U64] = sizeof(int64_t), | |
+ [CTLTYPE_U64] = sizeof(uint64_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
var util = require("util"); | |
var Factory = require("rosie").Factory; | |
Factory.define('child') | |
.sequence('id') | |
Factory.define('parent') | |
.sequence('id') | |
.attr('children', function () { | |
return [ |
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
<?php | |
print (42 || 0); // output `1' |
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
# You can put the following access restrictions that the Postfix SMTP server | |
# applies in the context of the RCPT TO command | |
smtpd_recipient_restrictions = | |
permit_mynetworks | |
permit_sasl_authenticated | |
reject_non_fqdn_helo_hostname | |
reject_invalid_helo_hostname | |
reject_invalid_hostname | |
reject_unauth_destination | |
reject_unauth_pipelining |
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
var fs = require("fs"); | |
function read(path, callback) { | |
fs.readFile(path, 'utf8', callback); | |
} | |
function cat(path) { | |
read(path, function (err, data) { | |
if (err) | |
throw err; |
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
collection.update( | |
{bookings: {$elemMatch: { | |
_id: unconfirmed._id, | |
expire_at: {$gte: now}, | |
confirmed_at: {$exists: false} | |
}}}, | |
{$set: {'bookings.$.confirmed_at': new Date()}}, | |
callback | |
); |
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
MongoDB shell version: 2.4.8 | |
connecting to: dev | |
> db.some_collection.ensureIndex({"sub.id":1}, {unique:true}); | |
> db.some_collection.insert({sub:[{id:42}]}) | |
> db.some_collection.find() | |
{ "_id" : ObjectId("5321a4b172a13ee462bc5c20"), "sub" : [ { "id" : 42 } ] } | |
> db.some_collection.update({}, {$push: {sub: {id:42}}}) | |
> db.some_collection.find() | |
{ "_id" : ObjectId("5321a4b172a13ee462bc5c20"), "sub" : [ { "id" : 42 }, { "id" : 42 } ] } | |
> db.some_collection.insert({sub:[{id:42}]}) |
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
==48808== Memcheck, a memory error detector | |
==48808== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. | |
==48808== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info | |
==48808== Command: ./perl -D128 t/op.each | |
==48808== | |
0x2000220: (00000) malloc 1 bytes | |
0x2000270: (00001) malloc 2 bytes | |
0x20002c0: (00002) malloc 10 bytes | |
0x2000310: (00003) malloc 72 bytes | |
0x20003a0: (00004) malloc 2 bytes |
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
(letrec ((abs | |
(lambda (x) | |
((if (< x 0) - +) x)))) | |
(display (abs 12))) |
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
# Rmilter | |
smtpd_milters = unix:/var/run/rmilter/rmilter.sock | |
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen} | |
milter_protocol = 4 | |
milter_rcpt_macros = i {rcpt_addr} | |
# skip mail without checks if milter will die | |
milter_default_action = accept |