Skip to content

Instantly share code, notes, and snippets.

View sony-mathew's full-sized avatar
🏠
Working from 🏠

Sony Mathew sony-mathew

🏠
Working from 🏠
View GitHub Profile
@sony-mathew
sony-mathew / sendEmailsFromSpreadsheet.js
Last active May 21, 2020 17:31
Google app script function to send emails from a spreadsheet.
/*
Structure of the spreadsheet
Email Name Sending Status Email Send Date Source Lead Created Date Current Status
memev20935@aprimail.com Sony Mathew EMAIL_SENT Thu, 21 May 2020 08:20:37 GMT EMAIL_SENT
*/
// All Contants here
var SPREADSHEET_URL = 'https://docs.google.com/spreadsheets/d/some-random-long-id/edit#gid=0';
@sony-mathew
sony-mathew / looped_command_runner.sh
Last active May 12, 2020 11:08
Run commands arbitrary number of times. (Use-cases : test out flakey failures, test out external system performance etc)
#!/bin/bash
# eg : ./spec_runner.sh -n 2 -c "ls -l"
# -n => number of times
# -c => command to be run
repeats=5
command_to_run="echo Hello World"
line_break() {
echo "-------------------------------------------------------------------"
@sony-mathew
sony-mathew / show-hide-mac.sh
Created February 20, 2018 18:23
Script to show hidden files in mac
#!/bin/bash
# There are many folders and files which are by default hidden in mac like the .ssh folder, .bash_profile .. etc.
# In order for that to show up in your finder you can use this script.
#
# Download this script and give it the execute permission : $ chmod 764 show-hide-mac.sh
# Now click on the script. It will popup a terminal window with 3 options.
# 's' for show
# 'h' for hide
# 'e' for exit
@sony-mathew
sony-mathew / hide-folder.bat
Created February 20, 2018 17:58
Hide folders in windows operating system using this script. You can password protect it and view and open it without unhiding it. Used shell. [cmd]
@echo off
setlocal enabledelayedexpansion enableextensions
:: Hide a folder in windows xp, windows 7 or windows 8 with a password.
:: Follow the steps as follows :
:: 1. Open private.bat file in a text editor say notepad or geany.
:: 2. On line 5, you have set "directory=e:\private".
:: Change the path from e:\private to your specified folder to hide.
:: If the path contains spaces then enclose in double quotes.
:: For eg: if your path is "f:\cool Guys" then change the line 5 to set directory="f:\cool Guys".
@sony-mathew
sony-mathew / wifi-adhoc.bat
Last active February 20, 2018 17:45
Create an adhoc network in windows 8 and make it running in a single click
:: Just run this wifi.bat as administrator to create an adhoc network in windows 8.
:: By default the name of the network will be named as "adhocnet".
:: If you want to change that right click on wifi-adhoc.bat and select edit.
:: In the first line there is a part ssid=adhocnet.
:: Replace the "adhocnet" with your desired name.
:: if your name contains spaces please put it in double quotes.
netsh wlan set hostednetwork mode=allow ssid=adhocnet key=password1
netsh wlan start hostednetwork
@sony-mathew
sony-mathew / contacts_formatter.php
Last active February 20, 2018 17:39
Phone Number Formatter. To format the phone contacts that is to add +91 or 0 to all contacts.
/*
Date : 29 Jan 2013
This php script is used to format the contacts in csv or vcf file.
For example you may when you out of state you can't call your friends without appending a zero or +91 (in INDIA) to all the numbers you dial.
It is very tiresome to edit each one of them.
Using this script it all of them are formatted in single second and it saves your time also.(only for India)
@sony-mathew
sony-mathew / index.js
Created February 20, 2018 04:45
Express Web server
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Hello World!'));
app.listen(3000, () => console.log('Example app listening on port 3000!'));