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
| /** | |
| * Locations.js | |
| * | |
| * @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
| * @docs :: http://sailsjs.org/#!documentation/models | |
| */ | |
| module.exports = { | |
| seedData:[ |
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
| packages: | |
| yum: | |
| git: [] | |
| gcc: [] | |
| make: [] | |
| openssl-devel: [] | |
| commands: | |
| 00-add-home-variable: | |
| command: sed -i 's/function error_exit/export HOME=\/root\n\nfunction error_exit/' /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh | |
| container_commands: |
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
| + (void)saveMusicFromURL: (NSURL *)sourceURL | |
| toFile: (NSURL *)destURL | |
| completion: (void(^)(BOOL success))_completion | |
| { | |
| AVURLAsset *asset = [AVURLAsset URLAssetWithURL:sourceURL options:nil]; | |
| NSError *err = nil; | |
| AVAssetReader *reader = [[AVAssetReader assetReaderWithAsset: asset | |
| error: &err] retain]; | |
| if(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
| def Secured[A](username: String, password: String)(action: Action[A]) = Action(action.parser) { request => | |
| request.headers.get("Authorization").flatMap { authorization => | |
| authorization.split(" ").drop(1).headOption.filter { encoded => | |
| new String(org.apache.commons.codec.binary.Base64.decodeBase64(encoded.getBytes)).split(":").toList match { | |
| case u :: p :: Nil if u == username && password == p => true | |
| case _ => false | |
| } | |
| }.map(_ => action(request)) | |
| }.getOrElse { | |
| Unauthorized.withHeaders("WWW-Authenticate" -> """Basic realm="Secured"""") |
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
| -- Copyright (c) 2009, Ionut Gabriel Stan. All rights reserved. | |
| -- | |
| -- Redistribution and use in source and binary forms, with or without modification, | |
| -- are permitted provided that the following conditions are met: | |
| -- | |
| -- * Redistributions of source code must retain the above copyright notice, | |
| -- this list of conditions and the following disclaimer. | |
| -- | |
| -- * Redistributions in binary form must reproduce the above copyright notice, | |
| -- this list of conditions and the following disclaimer in the documentation |