Skip to content

Instantly share code, notes, and snippets.

View biplobice's full-sized avatar
🖥️
while (success!==true) { keepMovingForward(); }

Md Biplob Hossain biplobice

🖥️
while (success!==true) { keepMovingForward(); }
View GitHub Profile
@biplobice
biplobice / README.md
Created November 17, 2026 05:41
Concrete CMS Audit Commands for Cursor Teams

Concrete CMS Audit Commands for Cursor Teams

Three reusable team commands for assessing Concrete CMS upgrades, PHP compatibility and security.

Command Purpose Optional skill
/audit-cms-upgrade Assess CMS upgrade readiness concrete-cms-upgrade-audit
/audit-php-upgrade Assess a PHP version transition environment-compatibility-audit
/audit-security Review security boundaries and vulnerabilities macareux-security-audit
@biplobice
biplobice / build-and-sync-assets-to-concrete.yml
Created September 14, 2026 07:24
Build frontend assets and open CMS PR
name: Build frontend assets and open CMS PR
#
# Build assets in a frontend repository, copy them into a separate
# Concrete CMS repository, and automatically create/update a pull request.
#
# Required repository secret:
#
# TARGET_REPO_TOKEN
#
@biplobice
biplobice / db_row_counts.php
Last active August 28, 2025 02:47
A simple PHP script to count the number of rows in all tables of a Concrete CMS database
<?php
/**
* @author: Biplob Hossain <biplob.me>
*/
defined('C5_EXECUTE') or die("Access Denied");
use Concrete\Core\Database\Connection\Connection;
use Concrete\Core\Support\Facade\Facade;
$app = Facade::getFacadeApplication();
@biplobice
biplobice / gist:0b0fd82344dd5ed1fe4a7183bc01749e
Created August 18, 2025 02:49
Customize ckEditor config options
<?php
// application/config/site.php
return [
'sites' => [
'default' => [
'editor' => [
'ckeditor4' => [
'custom_config_options' => [
'entities' => false, // Disables conversion of characters to HTML entities entirely. Example: Stops converting © into &copy;, or & into &amp;.
'basicEntities' => false, // Prevents encoding of “basic” characters like &, <, >, ", '.

EC SAML Troubleshooting

How the SAML Login Process Works (Advancing to the Next Step When the User Is Not Found):

  1. Initially, it seeks a user mapping in the EcSamlIdentityProviderUser table using the SAML Unique ID.
  2. If username linking is enabled, it searches for a user associated with the SAML username attribute.
  3. If email linking is enabled, it attempts to locate a user based on the SAML email attribute.
  4. If no match is found, it proceeds to create a new user entry in the Users table and establishes a mapping in the EcSamlIdentityProviderUser table.
@biplobice
biplobice / clean-expired-cookies.php
Last active October 5, 2022 11:05
A simple PHP script to delete expired auth type concrete cookies
<?php
use Carbon\Carbon;
defined('C5_EXECUTE') or die('Access Denied.');
/**
* @author: Biplob Hossain <biplob.ice@gmail.com>
*/
$db = app('database/connection');
@biplobice
biplobice / rest-api-response-format.md
Created September 9, 2022 04:54 — forked from igorjs/rest-api-response-format.md
REST API response format based on some of the best practices
@biplobice
biplobice / User.php
Created August 22, 2022 06:34 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@biplobice
biplobice / stripe_currencies.php
Created June 16, 2022 03:52
Stripe Currencies
<?php
return [
'AFN' => 'Afghan Afghani',
'ALL' => 'Albanian Lek',
'DZD' => 'Algerian Dinar',
'AOA' => 'Angolan Kwanza',
'ARS' => 'Argentine Peso',
'AMD' => 'Armenian Dram',
'AWG' => 'Aruban Florin',
@biplobice
biplobice / ssh-tutorial.md
Created May 20, 2022 06:58 — forked from slowkow/ssh-tutorial.md
ssh to a server without typing your password

How to ssh to a remote server without typing your password

Save yourself a few keystrokes. Follow the steps below:

  1. Run this Bash script on your laptop:

    #!/usr/bin/env bash
    

The hostname of your remote server.