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
<filters> | |
<filter>env-config/${ENV}.properties</filter> | |
</filters> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>true</filtering> | |
<includes> | |
<include>**/*.yml</include> | |
</includes> |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.heroku.sdk</groupId> | |
<artifactId>heroku-maven-plugin</artifactId> | |
<configuration> | |
<appName>${APP_NAME}-${REGION}-${ENV}</appName> | |
</configuration> | |
</plugin> | |
… |
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
source /Users/anuragkapur/tech-stuff/ak-skynet-env/scripts/git-completion.bash |
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
// Declaring a method that takes block parameters | |
+ (void)doWeHavePublishPermissionsForUserWithSuccessBlock:(void (^)(BOOL))successBlock | |
andFailureBlock:(void (^)(NSError *))failureBlock; | |
// Same as previous, but using a typdef for the block type for improved readability | |
typedef void (^ SuccessBlock)(BOOL); | |
typedef void (^ FailureBlock)(NSError *); | |
+ (void)doWeHavePublishPermissionsForUserWithSuccessBlock:(SuccessBlock)successBlock | |
andFailureBlock:(FailureBlock)failureBlock; |
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
@Path("{path:.*}") | |
public class AccessResource { | |
private final Logger log = LoggerFactory.getLogger(AccessResource.class); | |
@GET | |
public Response checkAccessGet(@Context HttpServletRequest request) throws IOException { | |
logRequestInfo(request); | |
return checkAccess(request); | |
} |
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
public class PlaygroundHttpClient { | |
private static final String X_FORWARDED_FOR = "X-Forwarded-For"; | |
private void executeHttpGetOnDropwizardPlaygroundGreeting(String xForwardedFor, String name, String userAgent) { | |
URI uri = null; | |
try { | |
uri = new URIBuilder() |
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
public class MyService extends Service<MyServiceConfiguration> { | |
@Override | |
public void initialize(Bootstrap<MyServiceConfiguration> bootstrap) { | |
bootstrap.setName("my-service"); | |
} | |
@Override | |
public void run(AccessDropServiceConfiguration configuration, Environment environment) throws Exception { | |
environment.addResource(new AccessResource()); |
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
# .profile for anuragkapur on ak-skynet | |
# Maven | |
M2_HOME=/Users/anuragkapur/tech-stuff/tools/apache-maven/apache-maven-3.3.1 | |
M2=$M2_HOME/bin | |
export PATH=$M2:$PATH | |
export M2_HOME=$M2_HOME | |
# Java | |
jdk7u65=/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home |
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
# In a standard setup a remote called "heroku" points to your app. Remove this and setup two new "remotes" called "staging" and # "production". | |
$ git remote rm heroku | |
# point the remote named "staging" to the "staging" version of your app | |
$ git remote add staging git@heroku.com:wistreesolutions-staging.git | |
# point the remote named "production" to the "live" version of your app | |
$ git remote add production git@heroku.com:wistreesolutions.git |
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
<?xml version="1.0" encoding="utf-8"?> | |
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> | |
<application>anurag-kapur</application> | |
<version>master</version> | |
<threadsafe>true</threadsafe> | |
</appengine-web-app> |