Skip to content

Instantly share code, notes, and snippets.

View ssiva13's full-sized avatar
🌐
Working from home

Simon Siva ssiva13

🌐
Working from home
View GitHub Profile
@ssiva13
ssiva13 / bash-alias.sh
Last active May 11, 2023 10:08
Creating a simple alias that takes an argument/parameter
# example of a simple alias structure
alias g-s='git status'
# examples of aliases that can take an argument
# create new branch
alias g-b='function new_branch(){ git checkout -b $1; }; new_branch'
# create new branch with 'feature/' prefix
alias g-feature='function feature_branch(){ git checkout -b feature/$1; }; feature_branch'
@ssiva13
ssiva13 / github-actions.yml
Last active August 22, 2022 07:00
This gist shows how to use ssh agent to run composer and npm install for packages from private repos in bitbucket through GitHub actions
name: SIMPLE ACTIONS
on:
pull_request:
branches: [ master, develop ]
jobs:
simple-job:
runs-on: ubuntu-latest

How to enable PHP LDAP extension?

Step 1

  • Find the loaded configuration file php.ini
  • Open php.ini file

Step 2

  • Windows
@ssiva13
ssiva13 / bashrc.md
Created April 21, 2022 12:33
Add colored git branch name to Ubuntu terminal

Add git branch if its present to PS1

  parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
  }

Replace the PS1 values with the following code block.

@ssiva13
ssiva13 / Yii2SweetAlertAsset.php
Last active October 31, 2022 09:43
Override yii data-confirm dialog globally using npm sweet alert. ( after installing with composer require npm-asset/sweetalert2 ) -- (make sure you add the override.js file to your main AppAsset.php file)
<?php
namespace app\assets;
use yii\web\AssetBundle;
class SweetAlertAsset extends AssetBundle
{
public $sourcePath = '@npm/sweetalert2/dist';
@ssiva13
ssiva13 / stepone.txt
Created March 14, 2022 05:46
Step One
This is a gist.
This is not just any gist.
This is my first gist.
There are many first gists, but this one is my first.
I must master it as I must master my life.
Without me, my gist is useless.
Without this gist, I wouldn't have any gist.