Skip to content

Instantly share code, notes, and snippets.

View alainalemany's full-sized avatar

Alain Alemany alainalemany

  • SPARX Logistics
  • Miami, Florida
  • 23:59 (UTC -04:00)
View GitHub Profile
@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active May 11, 2024 06:48
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@yugaego
yugaego / gist:79c7dedbd1f9a71e558b
Created July 25, 2014 13:58
OPCache configuration
[OPCache]
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=2000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=0
opcache.revalidate_freq=0
@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@tsolar
tsolar / phpmyadmin
Created September 3, 2013 21:00
phpmyadmin nginx config
server {
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;