Skip to content

Instantly share code, notes, and snippets.

@manishjaingit
manishjaingit / setupletsencrypt.sh
Created October 6, 2018 18:47
setup lets encrypt in Ubuntu 16.04
### To apply ssl certificate free via lets encrypt. ###
Step 1
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo nano /etc/nginx/sites-available/default
# change serverName yourdomainname.com
sudo systemctl reload nginx
@manishjaingit
manishjaingit / unzip.php
Last active June 27, 2017 17:37
for unzip the zip file on server
<?php
// assuming file.zip is in the same directory as the executing script.
$file = 'file.zip';
// get the absolute path to $file
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);
$zip = new ZipArchive;
$res = $zip->open($file);
@rcerrejon
rcerrejon / umlaut.sql
Last active February 28, 2020 17:17
Database replace bad characters to german (umlaut) characters
/*Database replace bad characters to german characters (SQL)*/
/*replace "pages" with yout table and "title" with your field*/
UPDATE pages SET title=replace(title,'ß', 'ß'), title=replace(title, 'ä', 'ä'), title=replace(title, 'ü', 'ü'), title=replace(title, 'ö', 'ö'), title=replace(title, 'Ä', 'Ä'), title=replace(title, 'Ãœ', 'Ü'), title=replace(title, 'Ö', 'Ö'), title=replace(title, '€', '€'), title=replace(title, '–', '–'), title=replace(title, '“', '“'), title=replace(title, '„', '„'), title=replace(title, '§', '§');
@kathangeorg
kathangeorg / gist:2225375
Created March 28, 2012 10:51
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]