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 / 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;

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.

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).
@deependhamecha
deependhamecha / windows-authentication-jdbc-springboot.md
Last active September 27, 2021 10:01
MS SQL Windows Based Authentication JDBC

type hostname and you will get your domain

application.properties

spring.datasource.url=jdbc:sqlserver://localhost;databaseName=DWIDDER2DB;domain=DESKTOP-2J92742;integratedSecurity=true;authenticationScheme=NTLM
spring.datasource.username=deepen
spring.datasource.password=abcd
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2013Dialect
spring.jpa.show-sql=true
@deependhamecha
deependhamecha / vscode-scripts-error.md
Created January 5, 2022 11:06
Visual Code running scripts error

Open vscode and settings.json and paste this:

"terminal.integrated.profiles.windows": {
  "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell",
    "args": ["-ExecutionPolicy", "Bypass"]
  }
},
@deependhamecha
deependhamecha / promise-example.md
Last active January 11, 2022 07:46
Promise Example
var fun = function(name) {
    var p = new Promise((resolve, reject) => {

        if(name=='Deepen') {
            resolve(`Congrats ${name}`);
        } else {
            reject('Fail');
        }
 });