Skip to content

Instantly share code, notes, and snippets.

View m4tlch's full-sized avatar
🏠
Working from home

Paul Nike m4tlch

🏠
Working from home
  • Ukraine
View GitHub Profile
@m4tlch
m4tlch / wget-files-cyrillic-friendly.sh
Created February 20, 2016 20:29 — forked from DmitrySandalov/wget-files-cyrillic-friendly.sh
Download all files from website using wget (+encoding)
#!/bin/zsh
wget -m -p -E -k -K -np --restrict-file-names=nocontrol http://site/path/
@m4tlch
m4tlch / drupal-colorbox.js
Created March 31, 2016 10:31
JS: Responsive ColorBox Drupal
/*
==========================================================================
$Colorbox Responsive
* How to make colorbox responsive
* see @ https://www.drupal.org/node/2154099
==========================================================================
*/
(function ($, Drupal, window, document, undefined) {
//Configure colorbox call back to resize with custom dimensions
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
@m4tlch
m4tlch / visor-archivos-online.md
Created June 7, 2016 07:19 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@m4tlch
m4tlch / 00.howto_install_phantomjs.md
Created December 9, 2016 11:01 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@m4tlch
m4tlch / nginx-tuning.md
Created February 5, 2017 22:34 — forked from denji/nginx-tuning.md
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.

@m4tlch
m4tlch / html.tpl.php
Created February 9, 2017 10:18 — forked from pascalduez/html.tpl.php
Drupal 7 — Move $scripts at page bottom
<!DOCTYPE html>
<html<?php print $html_attributes; ?>>
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $head_scripts; ?>
</head>
<body<?php print $body_attributes;?>>
@m4tlch
m4tlch / my.cnf
Created March 16, 2017 21:04 — forked from petemcw/my.cnf
Ubuntu MySQL 5.1 Configuration - 4GB RAM, Heavy InnoDB
# The MySQL database server configuration file.
#
# DESC: InnoDB mainly, heavy queries, fewer connections, 4GB RAM
#
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
@m4tlch
m4tlch / README.md
Created July 10, 2018 10:43 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@m4tlch
m4tlch / Laravel on VestaCP.md
Created July 29, 2018 20:53 — forked from peterbrinck/Laravel on VestaCP.md
Laravel web templates for VestaCP

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html