Skip to content

Instantly share code, notes, and snippets.

View bharathmuppa's full-sized avatar
🚀
Active

bharathmuppa bharathmuppa

🚀
Active
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">
<meta name="dcterms.created" content="Fri, 27 Jun 2014 21:02:23 GMT">
<meta name="description" content="">
<meta name="keywords" content="">
<title></title>
<!DOCTYPE html >
<html ng-app="myApp">
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
<script src="js/bgAccordian.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
#container{
@bharathmuppa
bharathmuppa / index.html
Created March 29, 2015 15:02
JS Bin closure and self invoking example // source http://jsbin.com/pakiqi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="closure and self invoking example">
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<button id="button">button</button>
<script id="jsbin-javascript">
@bharathmuppa
bharathmuppa / chrome.sh
Created October 2, 2018 20:40 — forked from revolunet/chrome.sh
Launch a new chrome instance with disable-web-security
#!/bin/sh
# on OSX : /Applications/Google\ Chrome\ 2.app/Contents/MacOS/Google\ Chrome
/path/to/Chrome --user-data-dir=/tmp/test1 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-web-security
/*
Given an array of size n, find the majority element.
The majority element is the element that appears more than floor(n/2) times.
You may assume that the array is non-empty and the majority element always exist in the array.
*/
/*
This solution complexity is
worst case : o(n)
best case: o(n/2) => though it is said as o(n), there is nothing wrong to mention as n/2 in best case
@bharathmuppa
bharathmuppa / .eslintrc.js
Last active August 19, 2019 22:48
Basic eslint configurations while migrating from tslint to eslint.
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
plugins: [
"@typescript-eslint/tslint"
@bharathmuppa
bharathmuppa / .prettierrc.js
Created August 19, 2019 22:49
prettier file configurations
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 4,
singleQuote: true
};
@bharathmuppa
bharathmuppa / .prettierignore
Created August 19, 2019 22:51
ignore file for prettier
package-lock.json
.next
node_modules/
@bharathmuppa
bharathmuppa / settings.json
Created August 19, 2019 22:53
VSCode setting while using eslint extension
{
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
{
"language": "typescript",
"autoFix": true
}
],
"editor.rulers": [