Skip to content

Instantly share code, notes, and snippets.

View KalanaPerera's full-sized avatar
🤟
born to code

Kalana Perera KalanaPerera

🤟
born to code
  • Sri Lanka / Singapore
View GitHub Profile
@KalanaPerera
KalanaPerera / move_to_rds.rb
Created August 8, 2016 17:34 — forked from guenter/move_to_rds.rb
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
@KalanaPerera
KalanaPerera / php-html-css-js-minifier.php
Created August 30, 2016 09:38 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* ----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/engine/plug/converter.php`
* ----------------------------------------------------------------------------------------
*/
ProxyRequests On
<VirtualHost *:443>
ServerName backend.localhost
SSLEngine on
SSLCertificateFile C:/xampp/apache/conf/backend.localhost/backend.localhost.pem
SSLCertificateKeyFile C:/xampp/apache/conf/backend.localhost/backend.localhost-key.pem
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_http2_module modules/mod_proxy_http2.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so