Skip to content

Instantly share code, notes, and snippets.

loopback:security:role isInRole(): $everyone +1ms
loopback:security:access-context ---AccessContext--- +0ms
loopback:security:access-context principals: +0ms
loopback:security:access-context principal: {"type":"USER","id":1} +0ms
loopback:security:access-context modelName Note +0ms
loopback:security:access-context modelId 1 +0ms
loopback:security:access-context property findById +0ms
loopback:security:access-context method findById +0ms
loopback:security:access-context accessType READ +0ms
loopback:security:access-context accessToken: +0ms
loopback:security:role isInRole(): $everyone +0ms
loopback:security:access-context ---AccessContext--- +0ms
loopback:security:access-context principals: +0ms
loopback:security:access-context principal: {"type":"USER","id":1} +0ms
loopback:security:access-context modelName Note +0ms
loopback:security:access-context modelId undefined +0ms
loopback:security:access-context property find +0ms
loopback:security:access-context method find +0ms
loopback:security:access-context accessType READ +1ms
loopback:security:access-context accessToken: +0ms
@DaGaMs
DaGaMs / slack_notifier.sh
Created March 9, 2016 17:30
A simple GridEngine epilog script to post to a Slack channel after a job script finished
# ==[ printSlack ]=============================================================
# Function to send output from the commandline to Slack.
#
# @parameter string $LEVEL INFO/ERROR/WARNING message. Changes emoji
# @parameter string $MESSAGE Message to send to slack.
printSlack()
{
####### Modify this! #######
WEBHOOKURL="https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYY/12345678910ABCDEF"
SLACK_BOTNAME=${SLACK_BOTNAME-$(hostname -s)};
@DaGaMs
DaGaMs / gist:7105381
Created October 22, 2013 18:18
Current mapping system
RKEntityMapping *itemMapping = [RKEntityMapping mappingForEntityForName:@"Item" inManagedObjectStore:managedObjectStore];
[itemMapping addAttributeMappingsFromDictionary:@{@"id": @"identifier"}];
[itemMapping addAttributeMappingsFromArray: @[@"created", @"timestamp", @"notes", @"version", @"type", @"sortOrder"]];
itemMapping.identificationAttributes = @[@"identifier"];
RKEntityMapping *fileMapping = [RKEntityMapping mappingForEntityForName:@"File" inManagedObjectStore:managedObjectStore];
[fileMapping addAttributeMappingsFromDictionary:@{@"id": @"identifier"}];
[fileMapping addAttributeMappingsFromArray: @[@"created", @"timestamp", @"version", @"md5"]];
fileMapping.identificationAttributes = @[@"identifier"];
@DaGaMs
DaGaMs / gist:5743272
Last active December 18, 2015 06:59
Shutter Iris open animation
[CATransaction begin];
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = .3;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
animation.type = @"cameraIrisHollowClose";
[self.view.window.layer addAnimation:animation forKey:@"shutterCloseAnimation"];
/*
* This class overrides the default table column rendering.
* It needs to show different icons for the different menu elements.
*/
@implementation NPOutlineViewItemView: CPView {
id object;
CPTextField _titleLabel @accessors(property=titleLabel);
CPImageView _iconImage @accessors(property=iconImage);
}