Skip to content

Instantly share code, notes, and snippets.

Nuxt is awesome but my blog ( is more. isn' t?

SUDHIR K GUPTA sudhir600

Nuxt is awesome but my blog ( is more. isn' t?
Block or report user

Report or block sudhir600

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sudhir600 / count_keys_in_array.js
Created Aug 1, 2019
Get total numbers of same key in array
View count_keys_in_array.js
// E.g
// let array = ["sudhir", "hello", "test", "sudhir", "a", "a", "a"]
//output = sudhir:2, hello:1, test: 1 and a:3
let obj = {}
if(obj[i] == undefined){
obj[i] = 0
sudhir600 / dynamically_chosen.html
Created Jul 12, 2019
Apply Jquery Chosen On Dynamically Added Select-element
View dynamically_chosen.html
<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="">
<div style="margin-bottom:10px;display: inline-block;">
<div class="here">
<select data-placeholder="choose Team" class="chosen-select" id="abcd">
<option value=""></option>
sudhir600 / camelCase.js
Created May 29, 2019 — forked from johnsmith17th/camelCase.js
To convert string to camel case in javascript.
View camelCase.js
function toCamelCase(str) {
return str.toLowerCase().replace(/(?:(^.)|(\s+.))/g, function(match) {
return match.charAt(match.length-1).toUpperCase();
sudhir600 / nuxt.config.js
Last active Feb 22, 2019
add settings.js in middleware
View nuxt.config.js
module.exports = {
mode: 'spa',
router: {
middleware: ['settings']
sudhir600 / settings.js
Last active Feb 22, 2019
global settings in nuxt vuejs
View settings.js
global.$s = require('../settings.json')
Object.defineProperty(Vue.prototype, '$s', { value: $s })
var a = $s['key']
or in html
View get and set from localStorage
<link rel="stylesheet" type="text/css" href="">
<style type="text/css">
background-color: transparent;
sudhir600 / set-custom-domain-on-localhost-with-xampp
Last active Oct 13, 2018 — forked from omarusman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onward are pretty much applicable on other operating system.
View set-custom-domain-on-localhost-with-xampp
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
View php mail function
$from = '';
$headers = "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-Type: text/html; charset=UTF-8" . PHP_EOL;
$headers .= "From: " . $from . "\r\n";
$headers .= "Reply-To: " . $from . "\r\n";
$headers .= "Return-Path: " . $from . "\r\n";
$headers .= "CC: \r\n";
You can’t perform that action at this time.