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
| # Ignore everything in this directory | |
| * | |
| # Except this file | |
| !.gitignore |
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
| DELETE `posts`,`postmeta` FROM `posts` LEFT JOIN `postmeta` USING (`post_id`) | |
| WHERE `postmeta_read` IS NULL OR | |
| (`postmeta_read`=b'10' | |
| AND `postmeta_liked`<1 | |
| AND `postmeta_starred`<1 | |
| AND `postmeta_shared`<1 | |
| AND DATEDIFF(CURDATE(),FROM_UNIXTIME(`posts`.`post_pubdate`)) > 14); | |
| OPTIMIZE TABLE `posts`,`postmeta`; |
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
| CREATE TABLE `postmeta` ( | |
| `post_id` char(16) NOT NULL, | |
| `user_id` bigint(20) unsigned NOT NULL, | |
| `postmeta_read` bit(2) NOT NULL DEFAULT b'0', | |
| `postmeta_starred` bit(2) NOT NULL DEFAULT b'0', | |
| `postmeta_liked` bit(2) NOT NULL DEFAULT b'0', | |
| `postmeta_shared` bit(2) NOT NULL DEFAULT b'0', | |
| `postmeta_lastupdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| `postmeta_cache` longtext, | |
| `postmeta_annotation` longtext, |
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
| Installed Packages | |
| ConsoleKit.i686 0.4.2-3.fc14 @updates | |
| ConsoleKit-libs.i686 0.4.2-3.fc14 @updates | |
| ConsoleKit-x11.i686 0.4.2-3.fc14 @updates | |
| GConf2.i686 2.31.91-1.fc14 @fedora | |
| GConf2-gtk.i686 2.31.91-1.fc14 @fedora | |
| ImageMagick.i686 6.6.4.1-16.fc14 installed | |
| ModemManager.i686 0.4.998-1.git20110706.fc14 installed | |
| ORBit2.i686 2.14.19-1.fc14 @fedora | |
| SDL.i686 1.2.14-11.fc14 @updates |
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 mongoose = require('mongoose') | |
| , Schema = mongoose.Schema | |
| , ObjectId = Schema.ObjectId | |
| ; | |
| mongoose.connect('mongodb://localhost/test_update_getters_setters_defaults'); | |
| var Fooschema = new Schema ({ | |
| name : { type: String, default: 'foo', required: true } | |
| , date : Date |
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
| grep "rel=\"canonical\"" * | awk '{ OFS = ""; ORS = ","; file = substr($1, 0, 4); href = match($0, /http:\/\/[^\"]+/); print "\"", file, "\": \"", substr($0, RSTART, RLENGTH), "\""}' | awk '{ OFS = ""; ORS = ""; len = length($0); print "{", substr($0, 1, len - 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
| html | |
| body | |
| h1 My Site | |
| p Welcome to my super lame site. | |
| include template.jqtl |
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 mongoose = require('mongoose'); | |
| mongoose.connect('localhost', 'testing_535'); | |
| console.error('mongoose version', mongoose.version); | |
| var OID = mongoose.Types.ObjectId; | |
| var ASchema = new mongoose.Schema({ | |
| square: mongoose.Schema.ObjectId | |
| , task: Number | |
| }); |
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
| Model.post('init', function() { | |
| if (!this.isNew) { | |
| var my = this | |
| , activePaths = Object.keys(this._activePaths.states.init); | |
| Object.keys(my._doc).forEach(function(path){ | |
| if (activePaths.indexOf(path) === -1) { | |
| delete(my._doc[path]); | |
| } | |
| }); | |
| this._doc = my._doc; |
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
| /*! | |
| * Alternative to Connect - Multipart | |
| * Copyright(c) 2010, 2011 TJ Holowaychuk <[email protected]>, Dan MacTough <[email protected]> | |
| * MIT Licensed | |
| */ | |
| /** | |
| * Module dependencies. | |
| */ |