Skip to content

Instantly share code, notes, and snippets.

View muralimano28's full-sized avatar
🎯
Focusing

Muralimanohar muralimano28

🎯
Focusing
View GitHub Profile
var expr = {};
function removeSpaces(expression) {
var cleanExpression = '';
for (var i = 0; i < expression.length; i += 1) {
if (expression[i] === ' ') continue;
cleanExpression = cleanExpression + expression[i];
}
@muralimano28
muralimano28 / Steps.txt
Last active November 13, 2017 16:27
Node script to automatically send emails about yesterday's commit using git-standup library. crontab is used for cron job
1. Install nodemailer
npm install nodemailer
2. Update your email and password in app.js file.
3. Update your workspace repository path before executing git-standup (check line no:16 in app.js)
4. Update your node install path and your app.js path.
5. Update your standup.sh script path in cron-file.txt.
6. Use below command to add cron job.
crontab cron-file.txt
7. Finally, feel free to play around with this code.
@muralimano28
muralimano28 / index.html
Created June 22, 2017 15:17
Testing re-rendering in mithril 0.2.4 vs mithril 1.0
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/0.2.4/mithril.min.js"></script>
<!-- <script src="https://unpkg.com/mithril/mithril.js"></script> -->
<title>JS Bin</title>
<script>
window.onload = function() {
@muralimano28
muralimano28 / index.js
Last active February 24, 2017 19:12
Turtle_command
'use strict';
// Steps:
// 1. Get input in command line.
// 2. Check if input is valid?
// - If input is valid.
// 1. Initialise gameboard.
// 2. Add blocks to the gameboard.
// - Loop through the array of blocks.
// - If block is out of gameboard range.
@muralimano28
muralimano28 / flatten_array.js
Created January 19, 2017 10:35
This code will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4]
'use strict';
function flattenArray(arr) {
if (!arr) {
return;
}
let outputArr = [];
let flattenUtil = function (input) {