Skip to content

Instantly share code, notes, and snippets.

View deependhamecha's full-sized avatar
🎯
Focusing

Deepen Dhamecha deependhamecha

🎯
Focusing
View GitHub Profile
@deependhamecha
deependhamecha / ErrorProfile.md
Last active April 16, 2016 11:34
Grails 3 (Gradle) Profile Error

Could not resolve all dependencies for configuration ':profile'. Type 'gradle dependencies' for more information.

This is due to mismatching profiles in grails (web,web-plugin etc.). By default, it is specified in application.yml when we create grails 3 application. However, when we change from application.yml file to application.groovy, it would have been missed.

Just add this to application.groovy,

grails{
    profile = 'web-plugin'
 codegen{
@deependhamecha
deependhamecha / execute-command-in-cmd.md
Last active July 6, 2022 11:18
Execute Command in Cmd

Implemenation to execute Command in CMD with java

public String execCmd(String cmd) throws java.io.IOException {
        java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
}
@deependhamecha
deependhamecha / add-eclipse-to-unity-launcher.md
Last active May 28, 2016 05:05
Add Eclipse To the Unity Launcher - Ubuntu 14.04.4

Add Eclipse to the Unity Launcher - Ubuntu 14.04.4

All the commands accessible are under /usr/bin

sudo ln -s /path/to/eclipse/eclipse /usr/bin

Now, eclipse is accessible as eclipse from command line. Now, check Unity Launcher, you will find eclipse there as Unity Shell also checks inside /usr/bin.

@deependhamecha
deependhamecha / multi-git.md
Created December 3, 2016 12:02 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@deependhamecha
deependhamecha / App\Exceptions\Handler.php
Created February 18, 2017 06:19 — forked from jacurtis/App\Exceptions\Handler.php
How to get filp/whoops to work in Laravel 5.2 or 5.3 - Add this code to your `App\Exceptions\Handler.php` file.
/**
* Create a Symfony response for the given exception.
*
* @param \Exception $e
* @return mixed
*/
protected function convertExceptionToResponse(Exception $e)
{
if (config('app.debug')) {
$whoops = new \Whoops\Run;
@deependhamecha
deependhamecha / core-js.md
Last active June 20, 2023 09:10
Core JS

Core.js

Versions
1 es5
2 es6
3 es2015
4 es7
5 es2016
6 es2017

Django Steps

Terminologies


The architectural design pattern of django is MVT (Model-View-Template)

Django Project: It is a collection of applications and configurations that when combined together will make up the full web application.

Django Application: It is created to perform a particular functionality for the entire web application. It can work individually and can be plugged into a project due to its modularity. e.g. registration app, comments app, etc. These Django Apps can then be plugged into other Django Projects, so you can reuse them.

@deependhamecha
deependhamecha / spring-security+jwt+rest.md
Last active July 6, 2022 11:21
Spring-Security + JWT + REST

Spring Security + JWT + REST API

We will create a sample application for JWT + Stateless Token + Spring Security + REST(JSON) API

  1. Create a Spring Boot Project with following dependencies:
    • Spring Web
    • Spring Security
    • Spring Boot DevTools and Other dependencies

What is Maven?

At first glance Maven can appear to be many things, but in a nutshell Maven is an attempt to apply patterns to a project's build infrastructure in order to promote comprehension and productivity by providing a clear path in the use of best practices. Maven is essentially a project management and comprehension tool and as such provides a way to help with managing:

@deependhamecha
deependhamecha / multipart-data-java.md
Last active September 27, 2021 07:45
Multipart Data

Since Spring 3.1, Spring comes with 2 out-of-the-box implementations of MultipartResolver to choose from:

  • CommonsMultipartResolver - Resolves multipart requests using Jakarta Commons FileUpload
  • StandardServletMultipartResolver - Relies on Servlet 3.0 support for multipart requests(since Spring 3.1).