Skip to content

Instantly share code, notes, and snippets.

View mshannaq's full-sized avatar

Mohammed AlShannaq mshannaq

View GitHub Profile
@mshannaq
mshannaq / gist:9d17d5a94997318d967739ebc46f5a44
Created February 27, 2024 21:30
create ssh key to access linux servers
how to create ssh key to access linux servers using key
@mshannaq
mshannaq / wordpressapi.php
Created February 24, 2024 00:38
wordpress api new post example
مثال علي استخدام
wordpress api
لانشاء مقال جديد
مثال
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Basic YWRtaW46eW91ci1hcHBsaWNhdGlvbi1wYXNzd29yZA==" \
-d '{
@mshannaq
mshannaq / index.html
Created December 22, 2023 23:21 — forked from redgeoff/index.html
Image Paste Textarea
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Paste Image Example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.4.6/bluebird.min.js"></script>
</head>
<body>
@mshannaq
mshannaq / macos_keyboard_hack_homebtn
Last active December 18, 2023 14:24
define 'Home' and 'End' on MacOS (uses Microsoft Keyboard) to be like Microsoft Windows
As you know in Microsoft Windows there is a button 'Home' which go to the begning of line and and button 'End' goes to the end of line.
In MacOS if you use Keyboard others that Mac Keyboard you cannot use 'Home' and 'End' button because it is not defined.
buu sure you can customize it and use it exactly as you use on Microsoft Keyboard
to do that open terminal and goto folder `~/Library/KeyBindings/` by running the command
```bash
cd ~/Library/KeyBindings/
@mshannaq
mshannaq / .php-cs-fixer.php
Created December 10, 2023 03:32
.php-cs-fixer.php for laravel 10.x that I use
<?php
/* .php-cs-fixer.php for laravel 10.x */
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@mshannaq
mshannaq / install_cloudpanel_on_debian11_programmatically.sh
Last active November 23, 2023 22:34
Install CloudPanel programmatically on Debian 11
#!/bin/bash
# CloudPanel Installation Script
# use this as an initialization script after creating a VM to install CloudPanel into
# your VM instance.
# you can use it in Digitalocean Initialization scripts or AWS user data.
# tested on DigitalOcean Droplets with Debian 11 on 24 Nov 2023
#
# @author: @mshannaq , Extendy team
# @License: MIT