Skip to content

Instantly share code, notes, and snippets.

View csesumonpro's full-sized avatar
🏇
First learn then earn

Sumon Sarker csesumonpro

🏇
First learn then earn
View GitHub Profile
<?php
namespace YourProjectNameSpace;
class Vite
{
protected static $moduleScripts = [];
protected static $resourceURL = 'http://127.0.0.1:3333/resources/';
protected static $assetsURL = FLUENT_TABLES_DIR_URL . 'assets/';
import {defineConfig} from 'vite'
import {viteStaticCopy} from 'vite-plugin-static-copy'
import vue from '@vitejs/plugin-vue'
import react from '@vitejs/plugin-react'
import liveReload from 'vite-plugin-live-reload';
import path from "path";
//Important: Key must be output filepath without extension, and value will be the file source
const inputs = {
'admin/app': 'resources/admin/app.js',
@csesumonpro
csesumonpro / php-serialized.php
Last active July 14, 2023 04:49
PHP serialized
a:2:{i:0;a:3:{s:4:"name";s:8:"John Doe";s:3:"age";i:30;s:5:"email";s:19:"johndoe@example.com";}i:1;a:3:{s:4:"name";s:10:"Jane Smith";s:3:"age";i:25;s:5:"email";s:19:"janesmith@example.com";}}
@csesumonpro
csesumonpro / Zsh permission denied issue fix.md
Created September 2, 2022 06:34
Zsh permission denied issue fix

Zsh permission denied issue fix

xattr -d com.apple.quarantine /Volumes/Projects/cli/wpfluent
@csesumonpro
csesumonpro / ssh.md
Created May 23, 2022 10:29
How to setup ssh key in github
ssh-keygen -t rsa -b 4096 -C your@email.com
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub #Mack and linux
clip < ~/.ssh/id_rsa.pub # Windows

~/.composer/vendor/laravel/valet/bin/ngrok authtoken token

~/.composer/vendor/laravel/valet/bin/ngrok http test.test:80 -host-header=rewrite

<?php
add_filter('ninja_tables/allowed_css_properties', function($properties){
$properties[] = 'visibility';
return $properties;
});
<?php
add_filter('ninja_tables/allowed_html_tags', function($tags) {
$tags['form'] = [
'action' => [],
'method' => [],
'target' => [],
];
$tags['input']['src'] = []; // If you need put an extra attribute in existing tag
return $tags;
});
@csesumonpro
csesumonpro / ninja tables search time delay filter.php
Last active February 15, 2022 09:28
Ninja table search time delay filter
<?php
add_filter('ninja_table_search_time_delay',function($time, $table_id) {
return 1500;
},10, 2);
@csesumonpro
csesumonpro / readme.md
Last active April 7, 2021 15:04
How to publish a project by github Pages command below

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

Step 2

Make sure git knows about your subtree (the subfolder with your site).

git add dist && git commit -m "Initial dist subtree commit"

Step 3

Use subtree push to send it to the gh-pages branch on GitHub.