This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select 'create sequence ' ||v.sequencename || ' owned by ' || v.table_name::text || '.' ||v.column_name::text || ';' AS createsequence, | |
'alter table ' || v.table_name::text || ' alter column ' || v.column_name::text | |
|| ' set default ' || v.column_default::text || ';' as altercolumnscript | |
from | |
(select | |
v.table_name, v.column_name, v.column_default, | |
replace(replace(replace(REPLACE(v.column_default,'nextval',''),'::regclass',''),'(''',''),''')','') | |
as sequencename | |
from | |
information_schema.columns v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#elasticsearch - nofile 65535 | |
#elasticsearch - memlock unlimited | |
# /etc/security/limits.conf | |
# | |
#Each line describes a limit for a user in the form: | |
# | |
#<domain> <type> <item> <value> | |
# | |
#Where: | |
#<domain> can be: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Api Endpoint for file Upload ,Read,Transform , Bulkinsert with Async Promise based condensed codeflow approach equipped with Queue structure | |
and progress status provided by Socket.io integration */ | |
router.post('/api/uploadcontent', function(req, res) { | |
/*New object and npm module(Busboy) initialized with cryptography conventions */ | |
let resp = new Object(); | |
let cryptoname = crypto.randomBytes(16).toString("hex"); | |
let fil; | |
let busboy = new Busboy({ | |
headers: req.headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(o){console.old=console.log,console.log=function(){var n,e,t="";for(e=0;e<arguments.length;e++)t+='<span class="log-'+typeof(n=arguments[e])+'">',"object"==typeof n&&"object"==typeof JSON&&"function"==typeof JSON.stringify?t+=JSON.stringify(n):t+=n,t+="</span> ";o.innerHTML+=t+"<br>",console.old.apply(void 0,arguments)}} | |
(document.body); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
reason for creating this plugin | |
https://select2.org/programmatic-control/add-select-clear-items#preselecting-options-in-an-remotely-sourced-ajax-select2 | |
which states that We need to modify our server api for client side plugin feature which is reallllly BAD ! | |
also if you guys find any multiselect + autopopulate with ajax and edit mechanism please comment below on gist ! | |
1. include modular-multiselect-plugin.js in base.html | |
2. include data-utils.js & plugin-enduser-implementation.js in base.html | |
3. include modular-multiselector.css in base.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters." | |
version: "1.0.0" | |
title: "Swagger Petstore" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
email: "apiteam@swagger.io" | |
license: | |
name: "Apache 2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "This is a sample server Petstore server.", | |
"version": "1.0.0", | |
"title": "Swagger Petstore", | |
"termsOfService": "http://swagger.io/terms/", | |
"contact": { | |
"email": "apiteam@swagger.io" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newObj = internObj.reduce((a, b) => Object.assign(a, b), {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
#Nodejs | |
sudo apt install nodejs | |
sudo apt install npm | |
#Postgres | |
sudo apt-get update | |
sudo apt install postgresql postgresql-contrib | |
#Redis-server | |
sudo apt install redis-server | |
sudo service redis-server start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File Refer https://drive.google.com/file/d/1fgEqB4LrSYhhgyeoKZl32ab-yO__bDht/view?usp=sharing | |
I would to optimized below query | |
select a.gender from "employees" as a | |
where lower( gender ) LIKE 'f%' group by gender | |
limit 20 |