Skip to content

Instantly share code, notes, and snippets.

View gargashwani's full-sized avatar
🎯
Focusing

Ashwani Garg gargashwani

🎯
Focusing
  • Delhi, India
View GitHub Profile
@gargashwani
gargashwani / README.md
Created May 18, 2024 03:56 — forked from piyushgarg-dev/README.md
Kafka Crash Course
@gargashwani
gargashwani / Dockerfile
Last active March 31, 2022 17:43
Sonarqube installation using docker
FROM sonarqube:7.4-community
@gargashwani
gargashwani / test.js
Created June 6, 2020 07:51
test react
import React, { Component } from 'react';
// Import Custom Components
import TextField from '../CustomFieldComponents/TextField';
import DateField from '../CustomFieldComponents/DateField';
import RadioField from '../CustomFieldComponents/RadioField';
export const CustomFieldContext = React.createContext();
export class CustomFieldProvider extends Component {
@gargashwani
gargashwani / main.dart
Last active January 15, 2020 09:54
Dart Maps
// DART Maps
Map<String, int> phoneBook = {
'Mary': 6563039400,
'Bindu': 9414521345,
'Ashwani': 9660025446
};
main(){
print(phoneBook['Mary']);
@gargashwani
gargashwani / Laravel Blade Javascript AJAX Requests
Created December 23, 2019 16:19
This Gist is all about AJAX GET, POST and DELETE requests in Laravel Blade file. Very useful shortcuts for me while Laravel development
"Laravel AJAX GET Request": {
"prefix": "laravelAjaxGET",
"body": [
"var id = $('#some_id').val();",
"url=\"{{url('users/')}}\" +\"/\"+ id;",
"console.log(url);",
"$.ajax({",
"\ttype: 'GET',",
"\turl: url",
"}).then(function (data) {",
## Reference:
https://packagist.org/packages/intervention/image
http://image.intervention.io/
$ composer require intervention/image
After you have installed Intervention Image, open your Laravel config file config/app.php and add the following lines.
In the $providers array add the service providers for this package.
config/app.php => Add in the Providers Array
// File Name "blade.json"
{
"Laravel Blade class for field error": {
"prefix": "errclass",
"body": [
"@error('$1') is-invalid @enderror"
],
"description": "attach validation error for individual field"
},
@gargashwani
gargashwani / docker-help.md
Created September 14, 2019 15:36 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

#######################
# APACHE INSTALLATION
#######################
sudo apt install apache2
# Apache2 is configured by placing directives in plain text configuration files.
# These directives are separated between the following files and directories:
# 1. apache2.conf: the main Apache2 configuration file. Contains settings that are global to Apache2.
# 2. httpd.conf: historically the main Apache2 configuration file, named after the httpd daemon.