Skip to content

Instantly share code, notes, and snippets.

View javagrails's full-sized avatar
💗
Coding - Coding - Coding & Coding

Salman* javagrails

💗
Coding - Coding - Coding & Coding
View GitHub Profile
@javagrails
javagrails / bash-torch.md
Last active April 1, 2020 15:55
Necessary bash commands

Necessary Bash Commands

Uninstall any package with Bash command from terminal here example with [ nginx ].
$ sudo apt-get remove nginx
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo apt-get remove --purge nginx 
@javagrails
javagrails / java-stream-nested-groupingBy.md
Last active January 11, 2019 06:52
java stream nested groupingBy

Scenerio

public class Student {
private int id;
private String name;
private List<State> states = new ArrayList<>();
}

public class State {
    private int id;

private String name;

@javagrails
javagrails / spring-postgresql-docker.config
Last active March 29, 2018 15:30
Spring PostgreSql by Docker Configuration for Development
---------------------- postgresql.yml ----------------------
version: '2'
services:
yourProjectName-pg:
image: postgres:9.6-alpine
volumes:
- ~/dockerdata/yourProjectName/postgresql/:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=openuser
- POSTGRES_PASSWORD=openpass
@javagrails
javagrails / solr data type field mapping info.json
Last active July 13, 2020 08:44
solr data type field mapping
https://bigwisdom.net/solr-tutorial-learn-solr-in-2-hours/
========================== Solr Basic Data Types for Index =============================
Data Type |Index_Suffix |Example
----------------------------------------------------------------------
String _s id:"1051",
String _s url_s:"https://javagrails.wordpress.com/",
String _s title_s:"MackBookProkk",
String _s description_s:"dmlasd",
String _s duration_s:"dasdsad",
@javagrails
javagrails / ubuntu-dev-env-ready-commands.txt
Last active November 1, 2019 09:12
ubuntu develop environment ready commands
===== ## ubuntu OS Information =====
sudo lsb_release -a
===== ## build essential for ubuntu =====
sudo apt-get install -y build-essential
sudo apt-get install libpng-dev libjpeg-dev -y
sudo apt-get install pngquant -y
sudo apt-get install unrar -y
@javagrails
javagrails / docker-helps.md
Last active December 28, 2017 19:14
docker common commands

Docker Helps

Docker is a tool which helps developers build and ship high quality applications, faster, anywhere.

Why Docker

With Docker, developers can build any app in any language using any toolchain. Dockerized apps are completely portable and can run anywhere.

Developers can get going by just spinning any container out of list on Docker Hub. Docker manages and tracks changes and dependencies, making it easier for sysadmins to understand how the apps that developers build work. And with Docker Hub, developers can automate their build pipeline and share artifacts with collaborators through public or private repositories.

@javagrails
javagrails / yarn-jhipster-update-commands.txt
Created December 14, 2017 18:56
yarn jhipster update commands
whereis yarn
yarn -v
sudo apt-get remove yarn && sudo apt-get purge yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn -y
@javagrails
javagrails / DateStringFormatter.java
Last active June 16, 2016 08:50
Java Custom Date Formatter
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
/**
* <b>DateStringFormatter</b>
*
* @author Salman
* Url https://github.com/javagrails
* @ since Created by Salman on 3/22/2016.
@javagrails
javagrails / index.html
Last active July 9, 2021 12:17
How to Setup a Local Static File Server in Windows by XAMPP - M.M. Saleh (Salman)
How to Setup a Local Static File Server in Windows by XAMPP
M.M. Saleh (Salman) - https://github.com/javagrails
total.bk - it may be a file server
1. create a folder for server root path in location [ D:\zfileserver ]
2. Go to the path [D:\xampp\apache\conf\extra]
Open the file [ httpd-vhosts.conf ]
@javagrails
javagrails / JavaIntegerBehave.java
Last active December 22, 2015 03:39
Java Integer Behaviour magic or bug? (not it's not bug) or you can give a name .... But it's a fine manage of JAVA architACT
public class JavaIntegerBehave {
public static void main(String[] args) {
Integer i= new Integer(10);
Integer j= new Integer(10);
System.out.println("R1: "+(i==j)); // false
Integer k= 10;//new Integer(10);
Integer l = 10;//new Integer(10);