Skip to content

Instantly share code, notes, and snippets.

@Al-Muhandis
Al-Muhandis / your_site.conf
Created April 29, 2018 16:22
Настройка nginx для проксирования telegram серверов
#user 'sampleuser' virtual host 'telegramapi.sample.com' configuration file
server {
server_name telegramapi.sample.com www.telegramapi.sample.com;
... ... ...
location / {
proxy_set_header Host api.telegram.org;
proxy_pass https://api.telegram.org;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@SimonEast
SimonEast / Export CSV.php
Last active August 2, 2023 15:47
PHP Example: Stream a CSV File to Browser with GZIP Compression (exporting from MySQL/PDO)
<?php
/**
* This script performs a full dump of a database query into
* CSV format and pipes it directly to the browser.
*
* - YES, the browser will save the CSV file to disk
* - YES, it should support large files without using massive amounts of memory
* - YES, it compresses the request using GZIP to reduce download time
*/
@kewogc
kewogc / gist:1d679c6c83977d69106f
Last active August 4, 2023 00:03
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata