Skip to content

Instantly share code, notes, and snippets.

@sudo-barun
sudo-barun / -laravel-blade-template-in-codeigniter.md
Last active December 26, 2018 11:28
Using Laravel Blade template in CodeIgniter and in other non-laravel projects

Use Laravel Blade template in CodeIgniter based projects

Usage:

  1. enable composer autoload in /application/config/config.php:

    $config['composer_autoload'] = TRUE;
  2. copy following files:

@sudo-barun
sudo-barun / apache-foreground.js
Created September 13, 2023 04:56
run Apache server in foreground
// This runs Apache server in foreground.
// Usage:
// sudo $(which node) apache-foreground.js
const child_process = require('child_process');
// SIGTERM listener has been set because Apache process can emit SIGTERM in parent process
// and by setting SIGTERM listener the default behavior of exiting the process is overridden
process.on('SIGTERM', () => {
});
@sudo-barun
sudo-barun / .htaccess
Created September 9, 2024 10:47
set SourceMap header when requesting JS file in Apache server (httpd)
<IfModule mod_headers.c>
<If "%{REQUEST_URI} =~ /\.js$/ && -f '%{REQUEST_FILENAME}' && -f '%{REQUEST_FILENAME}.map'">
Header set SourceMap "expr=%{REQUEST_URI}.map"
</If>
</IfModule>