Skip to content

Instantly share code, notes, and snippets.

View haigopi's full-sized avatar
💭
Who loves to code!

Gopi haigopi

💭
Who loves to code!
View GitHub Profile
user nginx nginx;
worker_processes 2;
error_log stderr warn;
events { worker_connections 4096; }
http {
include /etc/nginx/mime.types;
server_tokens off;
client_max_body_size 32m;
proxy_buffer_size 128k;
nginx:
image: nginx:latest
container_name: devqa_nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt:/etc/letsencrypt
user nginx nginx;
worker_processes 2;
error_log stderr warn;
events { worker_connections 4096; }
http {
include /etc/nginx/mime.types;
server_tokens off;
client_max_body_size 32m;
proxy_buffer_size 128k;
@haigopi
haigopi / route.ts
Created July 14, 2021 00:24
Route Definition
{
path: '/testURL',
name: 'TestModule',
component: () => import(/* webpackChunkName: "testOneView" */ '@/views/TestModuleOneView.vue'),
meta: { requiresAuth: false },
},
@haigopi
haigopi / ChunkLoadError.ts
Last active December 30, 2021 19:53
ChunkLoadError
router.onError(error => {
console.error(error);
Vue.prototype.$log.error('Failure Reason: ', error.message, error);
if (/ChunkLoadError:.*failed./i.test(error.message)) {
Vue.prototype.$log.error('Reloading Window 1');
window.location.reload();
}
else if (/Loading.*chunk.*failed./i.test(error.message)) {
Vue.prototype.$log.error('Reloading Window 2');
window.location.reload();
@haigopi
haigopi / GooglePay.ts
Created December 23, 2020 16:27
VueJS Integration with Google Pay
import Vue from 'vue';
declare let google: any
export default class GooglePayUtils extends Vue {
name = 'GooglePayUtils: ';
googlePayURL = 'https://pay.google.com/gp/p/js/pay.js';
private static _instance: GooglePayUtils;
private constructor() {
@haigopi
haigopi / PaymentGateway.vue
Last active December 22, 2020 00:22
Vue Paypal Example.
<template>
<v-container fluid>
<v-tabs
v-model="tab"
centered
dark
icons-and-text
background-color="orange accent-3"
next-icon="mdi-arrow-right-bold-box-outline"
prev-icon="mdi-arrow-left-bold-box-outline"
workbox.setConfig({ debug: `${process.env.VUE_APP_SW_DEBUG}` });
workbox.core.setCacheNameDetails({
// set the default cache name prefix. each domain should be unique to stop clashes
// this is used for runtime and precaching only
prefix: 'test-me',
});
workbox.routing.registerRoute(
public interface PublisherApi {
@RequestMapping(value = "/publisher", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
default ResponseEntity<Void> someCreatemethod(
@RequestPart("pictuures_1") MultipartFile[] pictures1,
@RequestPart("pictures_2") List<MultipartFile> pictures2, @RequestPart("publisher") JavaObject publisher) throws URISyntaxException, Exception {
// Debuuger Point.
System.out.println(pictures1.length +" -- "+ pictures2.size);
@haigopi
haigopi / ModelDetails.ts
Created November 7, 2020 01:09
ModelDetails
export default class ModelDetails {
public id?: string;
public userName?: string;
public name?: string;
public speciality?: string;
public pictures_1 = [];
public pictures_2 = [];
public disabledReason?: string;
public location = new ChefLocation();