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 / pm2.md
Created December 24, 2019 08:36
PM2 setup
Install PM2:
sudo npm install pm2 -g
pm2.config.json:
{
    "apps": [{
        "name": "app-8000",
@anilahir
anilahir / sql.md
Created December 20, 2019 08:14
MySQL transaction within stored procedure example

Create stored procedure :

DROP PROCEDURE IF EXISTS sp_delete_users_till_date;

DELIMITER //

CREATE PROCEDURE sp_delete_users_till_date(location_id INT, till_date DATE)
@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
@anilahir
anilahir / sed.md
Created May 14, 2019 06:57
Ubuntu/Linux - Search and grep multiple words from multiple files
sed -rnE 's/(^\[[0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\])(.*)(abc is (online|offline))(.*)/\1 \3/p' lumen-2019-05-09.log