Skip to content

Instantly share code, notes, and snippets.

Churiart churiart

Block or report user

Report or block churiart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@denji
denji / nginx-tuning.md
Last active Feb 21, 2020
NGINX tuning for best performance
View nginx-tuning.md

Moved to git repository: https://github.com/denji/nginx-tuning

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.

@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active Feb 20, 2020
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a:
@hollodotme
hollodotme / Install-php7.md
Last active Feb 15, 2020
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04
View Install-php7.md

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@vertexclique
vertexclique / cracking.md
Last active Jan 25, 2020
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )
View cracking.md

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@janikvonrotz
janikvonrotz / Install WordPress Blog.md
Created Mar 3, 2014
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu
View Install WordPress Blog.md

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
@christianroman
christianroman / OCR.java
Created May 15, 2012
Captcha OCR + Tesseract
View OCR.java
public class OCR {
private static final String INPUT = "C:/captcha/ex.png";
private static final String OUTPUT = "C:/captcha/captcha-out.png";
private static final String TESSERACT_BIN = "C:/Program Files/Tesseract-OCR/tesseract.exe";
private static final String TESSERACT_OUTPUT = "C:/captcha/out.txt";
private static final int WHITE = 0x00FFFFFF, BLACK = 0x00000000;
public static void main(String... args) throws Exception {
BufferedImage image = ImageIO.read(new FileInputStream(INPUT));
int average = 0;
@alihalabyah
alihalabyah / gist:4d39106eaa8fe48b481d
Created Jul 8, 2014
Clear Magento cart and quote items
View gist:4d39106eaa8fe48b481d
<?php
// Clear Magento cart and quote items
$cart = Mage::getModel('checkout/cart');
$cart->truncate()->save(); // remove all active items in cart page
$cart->init();
$session= Mage::getSingleton('checkout/session');
$quote = $session->getQuote();
$cart = Mage::getModel('checkout/cart');
@akamola
akamola / Perl.sublime-build
Created Mar 15, 2013
Sublime Text 2: Build system for Perl
View Perl.sublime-build
{
"cmd": ["perl", "-w", "$file"],
"file_regex": ".* at (.*) line ([0-9]*)",
"selector": "source.perl"
}
@kei0719
kei0719 / phpmyadmin_on_hhvm.conf
Last active Dec 11, 2015
Nginx config example on HHVM 3.0
View phpmyadmin_on_hhvm.conf
## here is phpmyadmin nginx
## environment
## OS: ubuntu 12.04
## Nginx: 1.4.7
## hhvm 3.0
## phpMyAdmin: 4.1.12
## locale: /etc/nginx/sites-available/phpmyadmin
@KaidenP
KaidenP / LEMH Install Script
Last active Dec 11, 2015
This is a auto installer that installs the packages needed for a LEMH (Linux (E)nginx MariaDB (PHP) HHVM) install
View LEMH Install Script
#!/bin/sh
########################################################################
# #
# Kaiden's LEMH Installer #
# #
# This is a auto installer that installs the packages needed for #
# a LEMH (Linux (E)nginx MariaDB (PHP) HHVM) install. #
# #
# Credit to: http://www.maketecheasier.com/setup-lemh-stack-in-ubuntu/ #
You can’t perform that action at this time.