Skip to content

Instantly share code, notes, and snippets.

View sab99r's full-sized avatar

Sabeer sab99r

View GitHub Profile
@sab99r
sab99r / Github-SSH-Setup.md
Last active March 17, 2022 10:33
Github SSH Setup

Check SSH Key exist

cd ~/.ssh

Generate New SSH Key (If Not Exist)

ssh-keygen -t ed25519 -C "[email protected]"
# Press Enter to save in default directory
# Enter Password on prompt
@sab99r
sab99r / php-shell-exec-git-pull.php
Last active November 17, 2021 10:26
PHP shell_exec Github Webhook Git Pull
```code
if($_POST['payload']) {
echo shell_exec('cd /var/www/html/RepoFolder/ && git reset --hard HEAD && git pull https://[email protected]/username/RepoName.git 2>&1');
}
```
```code
//Find the Executing user and give permission
echo shell_exec('whoami');
@sab99r
sab99r / apache-virtual-host.md
Last active September 7, 2021 11:23
CENT OS 8 APCHE Virtual Host (Sub Domain), LetsEncrypt
#Make Directory
mkdir /var/www/domain-name.com

#Make apache user the owner of this folder
chown apache:apache /var/www/domain-name.com/

#Apache works with all files with the .conf extension from the /etc/httpd/conf.d/ folder. Create a configuration file for your site.
nano /etc/httpd/conf.d/domain-name.com.conf
@sab99r
sab99r / debian-setup.md
Last active October 7, 2022 16:26
DEBIAN :: SETUP (NGINX, NODE, etc)

INSTALL NGINX

sudo apt update
sudo apt intsall nginx

Adjust Firewall

@sab99r
sab99r / git.md
Last active May 16, 2022 03:57
GIT #git

RESET TO LAST COMMIT

git reset --hard HEAD

REMOVE UNSTAGED FILES

git clean -df
@sab99r
sab99r / react-redux.md
Last active August 11, 2020 10:16
React Redux #redux #react

Basic Concepts

1. Actions

An action object can have other fields with additional information about what happened. By convention, we put that information in a field called payload

const addTodoAction = {
  type: 'todos/todoAdded',
  payload: 'Buy milk'
@sab99r
sab99r / flutter-quick-notes.md
Last active June 4, 2022 10:08
Flutter Quick Notes #Flutter

Flutter Cheet Sheet

1. Close Top Stack Widget (Eg. Bottom Sheet, Dialog, etc.)

Navigator.of(context).pop();

//In StatefulWidget => State Class context is like widget flutter defined object we can use it without defining

2. Theme

@sab99r
sab99r / cent-os-php-setup.md
Last active October 12, 2022 07:18
CentOS PHP Setup #centos
@sab99r
sab99r / laravel-notes.md
Last active May 25, 2020 09:23
[Laravel Notes] #laravel

Laravel Notes

Router

Route::get('/posts/{postId}',function($postId){
  //Request Params
  $param = request('param');
  return view('post',['id' => $postId]);
});
@sab99r
sab99r / MainActivity.java
Last active July 6, 2016 17:38
RecyclerView Load More Call from activity
public class MainActivity extends AppCompatActivity {
...
@Override
protected void onCreate(Bundle savedInstanceState) {
...
adapter = new MoviesAdapter(this, movies);
adapter.setLoadMoreListener(new MoviesAdapter.OnLoadMoreListener() {
@Override