Skip to content

Instantly share code, notes, and snippets.

View ma-he-sh's full-sized avatar
⚙️
Focusing

Mahesh Ranaweera ma-he-sh

⚙️
Focusing
View GitHub Profile
@ma-he-sh
ma-he-sh / darkmode.gs
Last active April 1, 2023 17:18
DarkMode for google apps
function onOpen() {
var ui = DocumentApp.getUi();
var menu = ui.createMenu('Dark Mode');
menu.addItem('Enable Dark Mode', 'enableDarkMode');
menu.addItem('Disable Dark Mode', 'disableDarkMode');
menu.addToUi();
}
function enableDarkMode() {
@ma-he-sh
ma-he-sh / setup.md
Created November 17, 2022 06:06
Setting Up Realsense for ROS Noetic on M1 Mac using UTM
@ma-he-sh
ma-he-sh / installer.sh
Created August 9, 2022 04:46
Install docker and docker-compoe for RaspberryPI4
sudo apt update && sudo apt-get upgrade
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker ${USER}
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
sudo pip3 install docker-compose
sudo systemctl enable docker
# Install brew (https://brew.sh)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install vim amd Ultimate Vim Configuration
brew install vim git
git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
# Update vimrc
cd ~/.vim_runtime && git pull --rebase && cd -
@ma-he-sh
ma-he-sh / init.vim
Last active January 30, 2021 14:24
neovim setup
call plug#begin()
Plug 'preservim/nerdtree' " NerdTree
Plug 'pangloss/vim-javascript' " JavaScript support
Plug 'leafgarland/typescript-vim' " TypeScript syntax
Plug 'maxmellon/vim-jsx-pretty' " JS and JSX syntax
Plug 'itchyny/lightline.vim' " Status
Plug 'Yggdroot/indentLine' " Indent Lines
Plug 'tpope/vim-fugitive' " Git Support
Plug 'airblade/vim-gitgutter' " Change Lines
@ma-he-sh
ma-he-sh / .antigenrc
Last active January 29, 2021 04:48
ZSH Setup
# Load oh-my-zsh library
antigen use oh-my-zsh
# Load bundles from the default repo (oh-my-zsh)
antigen bundle git
antigen bundle command-not-found
antigen bundle docker
antigen theme af-magic
@ma-he-sh
ma-he-sh / docker-compose.yml
Last active August 30, 2020 00:52
ElasticSearch and Kibana
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0
container_name: elasticsearch
restart: unless-stopped
environment:
- "network.host=0.0.0.0"
- "http.port=9200"
- "cluster.name=elasticsearch"
@ma-he-sh
ma-he-sh / .vimrc
Last active January 18, 2021 14:26
Vim
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-easy-align' " Easy Align
Plug 'ayu-theme/ayu-vim' " Ayu theme
Plug 'preservim/nerdtree' " NerdTree
Plug 'pangloss/vim-javascript' " JavaScript support
Plug 'leafgarland/typescript-vim' " TypeScript syntax
Plug 'maxmellon/vim-jsx-pretty' " JS and JSX syntax
Plug 'jparise/vim-graphql' " GraphQL syntax
Plug 'itchyny/lightline.vim' " Status
@ma-he-sh
ma-he-sh / Fix.md
Last active October 3, 2019 02:02
Fix for Dell XPS 9570 Long boot on Manjaro Linux

Important: [ Do at your own risk ]

DELL XPS 9570 Manjaro Long Boot

Solution1: try this first(at your own risk):worked for me

# find and update drivers
sudo mhwd -a pci nonfree 0300

Solution2:

@ma-he-sh
ma-he-sh / Building RethinkDB.md
Last active March 26, 2019 02:46
SettingUp Rethinkdb Linux

Installing Rethinkdb

# install dependency
sudo apt-get install python3-dev python3-pip libffi-dev libssl-dev
sudo pip3 install mitmproxy  # or pip3 install --user mitmproxy

sudo apt install libyaml-dev libxml2-dev libssl1.0-dev libreadline-dev zlib1g zlib1g-dev libbison-dev libxslt1-dev libxml2-dev