Skip to content

Instantly share code, notes, and snippets.

View muath-ye's full-sized avatar
🚀
npx muath

Muath Alsowadi muath-ye

🚀
npx muath
View GitHub Profile
@muath-ye
muath-ye / Turbolinks + Laravel.MD
Created June 29, 2023 13:08 — forked from yaza-putu/Turbolinks + Laravel.MD
Install Turbolink Navigation in laravel
  1. Get node binary (node.exe) from http://nodejs.org/download/
  2. Create the folder where node will reside and move node.exe to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

@muath-ye
muath-ye / blog.web.config
Created March 20, 2023 20:44 — forked from anonymous/blog.web.config
Web.config URL rewriting rules for hosting WordPress (PHP) on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Remove html" stopProcessing="true">
<match url="(.*).html$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@muath-ye
muath-ye / blog.web.config
Created March 20, 2023 20:43 — forked from adilmughal/blog.web.config
Web.config URL rewriting rules for hosting WordPress (PHP) on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Remove html" stopProcessing="true">
<match url="(.*).html$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@muath-ye
muath-ye / vite.config.js
Created March 9, 2023 18:13 — forked from mpociot/vite.config.js
Using Vite in combination with Valet's secured sites
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import fs from 'fs';
import { resolve } from 'path';
import { homedir } from 'os';
let host = 'sendstack.test';
let homeDir = homedir();
let serverConfig = {};
@muath-ye
muath-ye / tsconfig.json
Created October 30, 2022 19:44 — forked from mtimbs/tsconfig.json
basic default tsconfig for use in TypeScript projects
{
"compilerOptions": {
// project options
"lib": [
"ESNext",
"dom"
], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)

Change: launch_background

Path: android/app/src/main/res/drawable/launch_background.xml

Change this:

<item android:drawable="@android:color/white" />

To:

@muath-ye
muath-ye / heroku-remote.md
Created February 14, 2021 04:38 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@muath-ye
muath-ye / PewPewPew.php
Created May 8, 2020 21:38 — forked from ericlbarnes/PewPewPew.php
Hold up... Wait a minute... It's a Laravel Chopper
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class PewPewPew extends Command
{
protected $signature = 'pewpewpew';
protected $description = 'Command description';
@muath-ye
muath-ye / laravel.js
Created April 29, 2020 07:07 — forked from JeffreyWay/laravel.js
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {