Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
mizanRahman / checklist.md
Last active August 16, 2017 07:00
side project marketing checklist
layout checklist_page
title The Side Project Marketing Checklist
permalink /marketing-checklist/

Pre-Launch

Market Research

@mizanRahman
mizanRahman / gist:7b17918a8e23fb493a84e0c6be8950e8
Created May 8, 2017 19:13 — forked from fmasuhr/gist:4fd661b884f157590613
Associate a Vagrant project directory with an existing VirtualBox VM
  1. In the directory where your Vagrantfile is located, run the following command and copy the ID of your VM
VBoxManage list vms
=> "virtualMachine" {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
  1. Go to the Vagrant project configuration folder
@mizanRahman
mizanRahman / docker commands.sh
Created May 8, 2017 18:28
commonly used docker commands
docker ps
docker ps -a
docker images
docker rmi <image>
docker rm <container>
@mizanRahman
mizanRahman / config-mirror.yml
Created May 3, 2017 20:50
docker registry and mirror setup
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
@RunWith(MockitoJUnitRunner.class)
public class TokenAuthenticationFilterTest {
private static final String token = "260bce87-6be9-4897-add7-b3b675952538";
private static final String testUri = "/testUri";
@Mock
private SecurityService securityService;
@InjectMocks
@mizanRahman
mizanRahman / build.gradle
Last active October 18, 2016 19:12
Spring Boot files
/*
** When a spring boot project need to build as war
*/
apply plugin: 'war'
war {
baseName = 'myapp'
version = '0.5.0'
}

I want to wipe out my local changes that are not committed yet:

  1. wipe out all uncommitted changes that made:

    git checkout .

  2. But it will not wipe out new files that were not committed yet. to remove all uncommitted changes including newly created files:

@mizanRahman
mizanRahman / Rakefile
Last active August 10, 2016 20:10
release automation
require 'date'
require 'java-properties'
def psystem(command)
puts command
# system command
end
def tag_head(version)
@mizanRahman
mizanRahman / git-release.sh
Created July 20, 2016 20:21
git release tasks
#####################
## git release
#####################
# merge feature
function fmerge() {
branch=`git rev-parse --abbrev-ref HEAD`
echo "git pull"
echo "git pull origin $1"
echo "git push origin $branch"
ai = add --interactive
amend = commit --amend
assume = update-index --assume-unchanged
assumeall = !git st -s | awk {'print $2'} | xargs git assume
assumed = !git ls-files -v | grep ^h | cut -c 3-
br = branch
bra = branch -ra
branch = branch -ra
ca = commit --amend
caa = commit -a --amend -C HEAD