Skip to content

Instantly share code, notes, and snippets.

View Great-Antique's full-sized avatar

Denys Hirnyk Great-Antique

View GitHub Profile
@mehdichaouch
mehdichaouch / memory_usage.php
Last active April 11, 2024 15:55
PHP Snippet to get human readable memory usage
<?php
function convert($size)
{
$unit=array('b','kb','mb','gb','tb','pb');
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
}
convert(memory_get_usage());
@DenysMedvid
DenysMedvid / 01-synaptics.conf
Created May 27, 2015 11:08
Fix ThinkPad E440 Touchpad
# /etc/X11/xorg.conf.d/01-synaptics.conf
Section "InputClass"
Identifier "e440 top buttons"
MatchDriver "synaptics"
# right btn|middle btn
Option "SoftButtonAreas" "60% 0 0 0 40% 60% 0 0"
Option "HorizHysteresis" "30"
Option "VertHysteresis" "30"
Option "PalmDetect" "1"
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master