Skip to content

Instantly share code, notes, and snippets.

View deanet's full-sized avatar
:octocat:
talk is cheap, show me the code

deanetdavid deanet

:octocat:
talk is cheap, show me the code
View GitHub Profile
@igalic
igalic / restore-zimbra-config+mails.sh
Last active August 17, 2023 06:44
Restore Zimbra's ldap, mysql and config from backup, as well as the store
#!/bin/bash
# sources
# https://wiki.zimbra.com/wiki/LDAP_data_import_export
# http://wiki.zimbra.com/wiki/Mysql_Crash_Recovery
# http://wiki.zimbra.com/wiki/CLI_zmvolume
set -e
# set limits as per zmslapadd
ulimit -n 32768
ulimit -c unlimited
<?php
$username=$_GET['username'];
$password=$_GET['password'];
$message=$_GET['message'];
$type=$_GET['type'];
$id=$_GET['id'];
if(!$username && !$password && !$message && $type > 7 && $type < 0) { exit(); }
$agent = "Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.14912/812; U; ru) Presto/2.4.15";
@denji
denji / nginx-tuning.md
Last active May 14, 2025 02:43
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@ardianzzz
ardianzzz / 1kb editor
Last active October 28, 2016 09:12
1Kb HTML5 WYSWYG Editor
<html>
<head>
<title>1Kb HTML5 WYSWYG Editor</title>
<style>
.control {
margin:0 0 8px;
}
#editable {
padding:10px;
border:solid 1px #ccc;
@ekinertac
ekinertac / nginx.conf
Created May 6, 2013 10:37
nginx: port forwarding
server{
listen 80;
server_name example.com;
access_log /home/path_to_site/access.log;
error_log /home/path_to_site/error.log;
location / {
proxy_pass http://0.0.0.0:8002;
proxy_set_header Host $host;
@alertor
alertor / jira-behing-nginx-ssl
Last active April 27, 2023 15:45
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@schacon
schacon / gist:1
Created July 15, 2008 18:17
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.