Skip to content

Instantly share code, notes, and snippets.

@manishjaingit
manishjaingit / gist:5069f7ae26f81d136d1926be540131fc
Created September 9, 2018 11:33 — forked from kathangeorg/gist:2225375
Typo3 Multi Domain BASE URL
//TypoScript
# Multi Domain Configuration
[globalString = ENV:HTTP_HOST=example1.de]
config.baseURL = http:// www.example1.de/
[global]
[globalString = ENV:HTTP_HOST=www.example2.de]
config.baseURL = http:// www.example2.de/
[global]
<?php
/*$date = new DateTime('2017-12-21T01:30:00.0000000', new DateTimeZone('Asia/Kolkata'));
echo "Indian time:". $date->format("Y-m-d H:i:s P");echo "<br>";
$date->setTimeZone(new DateTimeZone('America/New_York'));
echo date('Y-m-d H:i:s', strtotime('2017-12-21T01:30:00.0000000') + (5.5 * 3600));*/
/*$a = function() {
echo 'hello world';
};
<?php
/*$date = new DateTime('2017-12-21T01:30:00.0000000', new DateTimeZone('Asia/Kolkata'));
echo "Indian time:". $date->format("Y-m-d H:i:s P");echo "<br>";
$date->setTimeZone(new DateTimeZone('America/New_York'));
echo date('Y-m-d H:i:s', strtotime('2017-12-21T01:30:00.0000000') + (5.5 * 3600));*/
/*$a = function() {
echo 'hello world';
};
@manishjaingit
manishjaingit / howto-s3bucket.md
Created November 4, 2017 15:02 — forked from ogt/howto-s3bucket.md
HOWTO - Create an amazon s3 bucket with its own domain, access keys

Assume that we want to create a bucket called foo.mydomain.com, and you have already mydomain.com

1. Create the bucket.
  - go to AWS console, s3, select the s3 region that you want.
  - name the bucket foo.mydomain.com
  - save and then select -> click actions-> properties 
  -> in properties click permissions -> add permissions add VIEW for EVERYBODY (s3 files are unguessable urls)

2. Create the CNAME
@manishjaingit
manishjaingit / config.ts
Created August 12, 2017 07:39 — forked from lorenzulrich/config.ts
TYPO3: One domain per language with RealURL
[globalVar = GP:L=1]
config {
sys_language_uid = 1
language = en
locale_all = en_CH.utf8
htmlTag_langKey = en
baseURL = http://default.domain.tld/
}
[global]
@manishjaingit
manishjaingit / realurl_conf.php
Created August 12, 2017 07:38 — forked from lorenzulrich/realurl_conf.php
TYPO3 RealURL: Two sites in an installation, both with one domain per language
<?php
$site1De = 'www.foo.de';
$site1DeWithPrefix = 'http://' . $site1De;
$site1Fr = 'www.foo.fr';
$site1FrWithPrefix = 'http://' . $site1Fr;
$site1It = 'www.foo.it';
$site1ItWithPrefix = 'http://' . $site1It;
@manishjaingit
manishjaingit / dropAllTablesFromDatabase.sh
Created August 12, 2017 07:37 — forked from lorenzulrich/dropAllTablesFromDatabase.sh
Drop all tables from MySQL database without root privileges
#!/bin/bash
MUSER="$1"
MPASS="$2"
MDB="$3"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)