Skip to content

Instantly share code, notes, and snippets.

View ashgkwd's full-sized avatar
💎
Open to work

Ash Gaikwad ashgkwd

💎
Open to work
View GitHub Profile
@ashgkwd
ashgkwd / Google Spreadsheet Result Generator.gs
Created October 3, 2016 07:00
Adds "Super Awesome Menu" from which you can generate result sheet base on Google form responce sheet
function onOpen() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var menu = [];
menu.push({name: "Get Results", functionName: "logData_"});
spreadsheet.addMenu("Super Awesome Menu", menu);
}
function logData_() {
Logger.log("This is my log, it's awesome :)");
var dest = copySheet_();
@ashgkwd
ashgkwd / PouchDB Basics.js
Created September 16, 2016 09:44
Basic CURD Operations in browser using PouchDB
var db = new PouchDB('ar-db');
var leads = [{
_id: 'a'+Date.now(),
name: "Murali Prasad Sharma",
contact: [{
handle: "9867327500",
channel: "Mobile"
}, {
handle: "ash.gkwd@gmail.com",
channel: "Email"
@ashgkwd
ashgkwd / slack_post.py
Created December 18, 2015 14:20
Post messages in your slack from commandline. Configurable python script. I use it for auto test updates from embedded devices.
"""
Author: Ashish Gaikwad <ash.gkwd@gmail.com>
Description: This script will post a message on your slack channel
Please configure your `/etc/slack_post.cfg` file first.
Example slack_post.cfg
[slack]
url=https://hooks.slack.com/services/XxXxXxXxXx
channel=botwa
@ashgkwd
ashgkwd / usb_power_cycle_reset.sh
Created August 5, 2015 14:00
Reset Power Cycles in USB Ports. Run this function as root user. You can include this fule in .bashrc, if you are frequent user.
powerCycleUSB_3 () {
for i in $(ls /sys/bus/pci/drivers/xhci_hcd/|grep :)
do echo $i >/sys/bus/pci/drivers/xhci_hcd/unbind
echo $i >/sys/bus/pci/drivers/xhci_hcd/bind
done
}
powerCycleUSB_2 () {
for i in $(ls /sys/bus/pci/drivers/ehci_hcd/|grep :)
do echo $i >/sys/bus/pci/drivers/ehci_hcd/unbind
@ashgkwd
ashgkwd / agbashrc.sh
Last active November 27, 2018 12:17
A bash rc add-on which contains simple functions and aliases which are generally used by the author
# @author: Ashish Gawikwad <ash.gkwd@gmail.com>
# @license: MIT License
# @script: It contains all the functions and aliases which
# are frequently used by author.
#
sleepToRAM () {
dbus-send --system --print-reply \
--dest="org.freedesktop.UPower" \
/org/freedesktop/UPower \