Skip to content

Instantly share code, notes, and snippets.

View anilahir's full-sized avatar
🏠
Working from home

Anil Ahir anilahir

🏠
Working from home
View GitHub Profile
@anilahir
anilahir / mysql-docker.sh
Created August 14, 2021 05:43 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@anilahir
anilahir / DOCKER_COMPOSE.md
Created August 14, 2021 05:42 — forked from GabrielCzar/DOCKER_COMPOSE.md
Docker compose samples

Scripts to run specific services

@anilahir
anilahir / gist:3ac58e570106d919cedb5a5928d27bf4
Created June 26, 2021 06:00 — forked from jtdp/gist:5443297
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@anilahir
anilahir / Robo3T-Installation-Menu.sh
Created December 11, 2020 07:16 — forked from chetanppatil/Robo3T-Installation-Menu.sh
robomongo 3t installtion and creating shortcut
#!/bin/bash
cd /tmp || exit
echo "Downloading Robomongo ..."
wget -q https://download.studio3t.com/robomongo/linux/robo3t-1.4.2-linux-x86_64-8650949.tar.gz
tar -xzf robo3t-1.4.2-linux-x86_64-8650949.tar.gz
rm robo3t-1.4.2-linux-x86_64-8650949.tar.gz
echo "Installing to opt..."
if [ -d "/opt/RoboMongo" ];then
sudo rm -rf /opt/RoboMongo
@anilahir
anilahir / webhook.gs
Last active December 4, 2020 07:24 — forked from lifehome/webhook.gs
Google Forms + Webhook : JSON example
var POST_URL = "http://localhost:3000";
function onFormSubmit(e) {
var data = {
"form": {
"id": e.source.getId(),
"title": e.source.getTitle() ? e.source.getTitle() : "Untitled Form",
"is_private": e.source.requiresLogin(),
"is_published": e.source.isAcceptingResponses(),
@anilahir
anilahir / terminal-git-branch-name.md
Created November 11, 2020 10:08 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@anilahir
anilahir / .coveralls.yml
Created December 6, 2019 11:56 — forked from khaosdoctor/.coveralls.yml
Travis CI Example for a PHP Application with Coveralls integration
# Set folder to clover (must be the same on travis)
coverage_clover: build/logs/clover.xml
# Same folder here
json_path: build/logs/coveralls-upload.json
# Don't touch that
service_name: travis-ci
# This needs a travis file: https://gist.github.com/khaosdoctor/5f6989c4fc27ecc03955