Skip to content

Instantly share code, notes, and snippets.

View rao123dk's full-sized avatar
🎯
Focusing

Dheeraj kumar Rao rao123dk

🎯
Focusing
View GitHub Profile
@BretCameron
BretCameron / .npm-init.js
Created June 21, 2019 10:46
A custom npm init script, which incorporates an initial GitHub commit. The file should be in your home directory.
const { execSync } = require('child_process');
function run(func) {
console.log(execSync(func).toString())
}
module.exports = {
name: prompt('package name', basename || package.name),
version: prompt('version', '0.0.0'),
decription: prompt('description', ''),
@endemic
endemic / coding_challenge.js
Created August 8, 2016 20:47
Sample coding example
function assert(one, two) {
if (one !== two) {
throw new Error(`${one} not equal to ${two}!!`);
} else {
console.info(`Success! ${one} is equal to ${two}!`);
}
}
function nextServerNumber(arrayOfInts) {
let lowestServerNumber = 1;