Skip to content

Instantly share code, notes, and snippets.

View srinivasKandukuri's full-sized avatar
🪱
C4R4X35

SK srinivasKandukuri

🪱
C4R4X35
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@srinivasKandukuri
srinivasKandukuri / metadata.json
Created September 14, 2021 12:33
metadata.json
{
"linkedin": "linkedin.com/in/srinivaskandukuri",
"dev.io": "dev.to/srinivaskandukuri",
"unsplash": "unsplash.com/@_____no_______one___",
"instagram": "instagram.com/_____no_______one___"
}
@srinivasKandukuri
srinivasKandukuri / avatar.md
Last active September 14, 2021 12:51
🔥.

Jascript-Zero-to-Hero

@srinivasKandukuri
srinivasKandukuri / media-query.css
Created July 7, 2018 12:38 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@srinivasKandukuri
srinivasKandukuri / index.js
Created June 21, 2018 13:44
Find out number of words in a String && split String based on Camelcase
var str = "saveChangesInTheEditor";
var words = str.replace(/([a-z])([A-Z])/g,'$1 $2');
console.log(words.split(" ").length);
@srinivasKandukuri
srinivasKandukuri / server.js
Created June 20, 2018 07:13
express, node js cluster simple server.js
const express = require('express');
const cluster = require('cluster');
const bodyParser = require('body-parser');
const compression = require('compression');
/**
* ExpressJSUtils module.
* @module ui/util/ExpressJSUtils
*/
@srinivasKandukuri
srinivasKandukuri / index.js
Last active June 19, 2018 11:42
Node js Create a Folder, subfolder if does not exist ,then move file one folder to other folder(created new sub folder),(Sample node js service)
/*
* Method : 1
*/
function CreateFolderMoveFile(){
var dir = './tmp/';
var date = new Date();
var foldername = date.getFullYear()+"_"+date.getMonth()+"_"+date.getDate();
var pathToFile = dir+foldername;
if (!fs.existsSync(pathToFile)) {
@srinivasKandukuri
srinivasKandukuri / Object.create()_inheritance.js
Last active June 1, 2017 04:04
Javascript Basic inheritance example
function Employee(name){
this.name = name;
this.dept = 'IT';
}
Employee.prototype.details = function(name,dept){
this.name = name;
this.dept = dept;
console.log('Employee Name : '+this.name +' And His Dept : '+ this.dept);
}
@srinivasKandukuri
srinivasKandukuri / apply()_call().js
Last active June 1, 2017 03:50
Javascript Methods call() and apply() Examples
// simple constructor function return sum of argument values
function sum(){
var result = 0;
for(var i=0; i <arguments.length; i++){
result += arguments[i];
}
return result;
}
/**
@srinivasKandukuri
srinivasKandukuri / autocomplete.js
Last active May 24, 2017 13:21
Auto Complete using Angular Js 1.X
var app = angular.module('app',[]);
app.directive('autocomplete', function(){
return {
restrict:'E',
template: '<div class="autocomplete">'+
'<input type="text" class="form-control" ng-model="searchTerm" ng-change="search()" ng-keydown="checkKeyDown($event)">'+
'<ul class="ul-style">'+
'<li ng-repeat="suggestion in suggestions track by $index" ng-click="assignValue($index)" ng-class="{active : selectedIndex === $index}">{{suggestion}}</li>'+
'</ul>'+