Skip to content

Instantly share code, notes, and snippets.

View mehdichaouch's full-sized avatar
🤖
Happiness Developer

Mehdi Chaouch mehdichaouch

🤖
Happiness Developer
View GitHub Profile
@evgenyneu
evgenyneu / setup_cursor_ubuntu.md
Last active April 24, 2025 13:20
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
@Tjitse-E
Tjitse-E / rector.php
Created January 29, 2024 13:50
Add missing dynamic properties using RectorPHP
<?php
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);
// Define directories to check
$directories = [

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@mehdichaouch
mehdichaouch / README.md
Last active November 30, 2023 17:33
🔧 WordPress Plugins Compatibility from command line with WP-CLI
@tschallacka
tschallacka / Seeder.php
Created November 2, 2022 19:39
Bigbridge importer example
<?php
declare(strict_types=1);
use Symfony\Component\Console\Output\OutputInterface;
use BigBridge\ProductImport\Api\Importer;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Exception\NoSuchEntityException;
use BigBridge\ProductImport\Api\Data\SimpleProduct;
use BigBridge\ProductImport\Api\Data\SimpleProductFactory;
use BigBridge\ProductImport\Api\ImportConfigFactory;
use BigBridge\ProductImport\Api\ImporterFactory;
@SeanCannon
SeanCannon / dnsmasq OS X.md
Created July 14, 2022 02:20 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@vbuck
vbuck / magento-config-diff-generator.php
Created March 18, 2021 15:12
Calculate the diff between 2 Magento core_config_data tables and generate as SQL
<?php
namespace MagentoTools;
class Generator
{
private $config = [
'type' => CsvSnapshotConfig::class,
'left' => null,
'right' => null,
@FredericMartinez
FredericMartinez / tinymce4Adapter.js
Last active March 17, 2021 15:10
Remove <p> WYSIWYG Magento 2
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*
* => app/design/adminhtml/Namespace/project_name/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
*/
/* global popups, tinyMceEditors, MediabrowserUtility, Base64 */
/* eslint-disable strict */
define([
@zulhfreelancer
zulhfreelancer / delete-github-actions-runs.sh
Last active October 11, 2022 13:01
Delete all GitHub Actions runs
# ===========================================================================
# Requirements
# * gh CLI: https://cli.github.com (make sure you are logged-in to the CLI)
# * jq CLI: https://stedolan.github.io/jq
# ===========================================================================
export TARGET_USER=github_user_or_org
export TARGET_REPO=github_repo_name
while :