Skip to content

Instantly share code, notes, and snippets.


Jane Ullah janoulle

View GitHub Profile

Keybase proof

I hereby claim:

  • I am janoulle on github.
  • I am janeullah ( on keybase.
  • I have a public key ASDNihFGZM_H4jjuu9tfececf9hctyuL54srXLDKbap6Awo

To claim this, I am signing this object:

janoulle / sample-docker-build.txt
Created May 6, 2018
Sample docker build command
View sample-docker-build.txt
docker build --build-arg JAR_FILE=build/libs/AppServer-0.0.1-SNAPSHOT.jar -t myapp-server:beta -f docker\myapp-server\Dockerfile .
janoulle / sample-docker-run.txt
Last active May 6, 2018
Sample docker run command
View sample-docker-run.txt
docker run -p 8080:8080 -p 8000:8000 --env-file ../Docker/myapp/environmentvariables-server.env --name myapp-server --link myapp-db --network myapp-network -v C:/Users/jane/Repositories/Docker/myapp/downloads/webpages:/usr/local/tomcat/downloads/webpages -v C:/Users/jane/Repositories/Docker/myapp/logs:/usr/local/tomcat/logs myapp-server:beta
View heroku yml missing
=== Fetching app code failed
=!= Your app does not include a heroku.yml build manifest. To deploy your app, either create a heroku.yml:
Or change your stack by running: 'heroku stack:set heroku-16'
View Sample docker-compose files for web server and db
sample docker-compose file
# Use postgres/example user/password credentials
version: '3.1'
View Gradle task for building docker image
//generates image like this: $
task image(type: Docker, dependsOn: build ) { = '' //this prevents the generated image from having the group value added. Personal preference to do this
applicationName = "yourapp"
dockerfile = file('Dockerfile')
tagVersion = 'latest'
doFirst {
copy {
from jar
into "${stageDir}/target"
View Sample dockerfile for Java spring boot application
# Using the alpine image as a base​
FROM openjdk:8-jdk-alpine
# maintainer
MAINTAINER "Jane Doe <>"
# For keeping size small
RUN apk add --no-cache curl

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

janoulle / AWS4Signer.groovy
Created Sep 30, 2017 — forked from devilelephant/AWS4Signer.groovy
Java/Groovy example of using Amazon AWS AWS4Signer class to sign requests (in our case elasticsearch calls)
View AWS4Signer.groovy
import com.amazonaws.DefaultRequest
import com.amazonaws.SignableRequest
import com.amazonaws.auth.AWS4Signer
import com.amazonaws.auth.AWSCredentialsProvider
import com.amazonaws.http.HttpMethodName
import groovy.util.logging.Slf4j
import org.apache.http.client.utils.URLEncodedUtils
import org.springframework.http.HttpHeaders
janoulle / custom_command_kendoui_mvc
Last active Aug 29, 2015
KendoUI Custom Command MVC
View custom_command_kendoui_mvc
//removeForm and approveForm are JavaScript functions
<script type="text/javascript">
function removeForm(e){