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
multiline { | |
pattern => "^\d" | |
what => "previous" | |
negate => true | |
} |
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
<?php | |
namespace App\Controller; | |
use Cake\Controller\Controller; | |
class RecipesController extends AppController | |
{ | |
public function initialize() |
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
{ | |
"paths": [ "/a/path" ], | |
"fields": { "type": "a_type" }, | |
"join": [ | |
{ | |
"not": "^\\d{4}-\\d{2}-\\d{2}", | |
"with": "previous" | |
} | |
] | |
} |
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
meteor create testFindOne | |
cd testFindOne | |
meteor mongo | |
# insert some data | |
db.users.insert({id:1, profilePicture: 'test1.png'}); | |
db.users.insert({id:2, profilePicture: 'test1.png'}); | |
# exit mongo | |
meteor | |
open: http://127.0.0.1:3000 |
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 t = new Mongo.Collection(null); | |
> undefined | |
< t.insert({ble: 1}) | |
> "EvZXebTK3HdhJPNCY" | |
< t.insert({ble: 2}) | |
> "GfeBhBptZxYruApqo" | |
< t.insert({ble: 4}) | |
> "gmg8kPEWzyiC2hBys" | |
< var c = t.find(); | |
> undefined |
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
Template.sessionDialog.onRendered(function() { | |
$('#myModal').on('hidden.bs.modal', function (e) { | |
Blaze.remove(Blaze.getView($('#myModal').get(0))); | |
}) | |
}); | |
Template.loggedin.events({ | |
"click #showCreateSessionDialog": function (e, tmpl) { | |
Blaze.renderWithData(Template.sessionDialog, |
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
activedirectorylogin { | |
com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule sufficient | |
debug="true" | |
contextFactory="com.sun.jndi.ldap.LdapCtxFactory" | |
providerUrl="ldap://mydomain.com:389" | |
bindDn="<bind-user>" | |
bindPassword="<bind-user-password>" | |
authenticationMethod="simple" | |
forceBindingLogin="true" | |
userBaseDn="<base-dc>" |
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
{ "_id" : ObjectId("55c4cad542d5abb845ee68ab"), "date" : "1", "type" : "C" } | |
{ "_id" : ObjectId("55c4cad642d5abb845ee68ac"), "date" : "1", "type" : "C" } | |
{ "_id" : ObjectId("55c4cad842d5abb845ee68ad"), "date" : "1", "type" : "C" } | |
{ "_id" : ObjectId("55c4cadc42d5abb845ee68ae"), "date" : "1", "type" : "A" } | |
{ "_id" : ObjectId("55c4cadc42d5abb845ee68af"), "date" : "1", "type" : "A" } | |
{ "_id" : ObjectId("55c4cade42d5abb845ee68b0"), "date" : "1", "type" : "B" } | |
{ "_id" : ObjectId("55c4cae142d5abb845ee68b1"), "date" : "2", "type" : "B" } | |
{ "_id" : ObjectId("55c4cae242d5abb845ee68b2"), "date" : "2", "type" : "B" } | |
{ "_id" : ObjectId("55c4cae442d5abb845ee68b3"), "date" : "2", "type" : "A" } | |
{ "_id" : ObjectId("55c4cae542d5abb845ee68b4"), "date" : "2", "type" : "C" } |
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
{{#autoForm ... }} | |
... | |
{{> afQuickField name="createdBy" }} | |
... | |
{{/autoForm}} |
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
selector: function( userId ) { | |
var roleNames = _.pluck(Roles.find({users: {$in: [userId]}}, {fields: {name: 1, _id: 0}}).fetch(), 'name'); | |
var users = []; | |
var query; | |
if (_.contains(roleNames, 'manager')) { | |
// this wrapping is just for keeping the code readable | |
query = Meteor.users.find({}, { fields: {_id: 1 }, transform: function (doc) { doc.users = doc._id; return doc;}}); | |
// or: | |
// query = { users: [ userId ] }; | |
} else if (_.contains(roleNames, 'admin')) { |
OlderNewer