Skip to content

Instantly share code, notes, and snippets.

@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active April 29, 2024 15:21
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

@isuzuki
isuzuki / .php_cs
Last active September 26, 2022 19:58
Config for PHP-CS-Fixer ver 2 (based on laravel .php_cs https://github.com/laravel/framework/blob/5.4/.php_cs)
<?php
/**
* Config for PHP-CS-Fixer ver2
*/
$rules = [
'@PSR2' => true,
// addtional rules
@escapedcat
escapedcat / package.json
Last active May 16, 2018 09:39
npm scripts including node-sass and autoprefixer
{
"name": "foo",
"version": "1.0.0",
"description": "foo project",
"main": "index.js",
"scripts": {
"start": "npm run serve | npm run watch-css",
"serve": "./node_modules/.bin/http-server -p 8080",
"build-css": "./node_modules/node-sass/bin/node-sass app/sass/style.scss -o app/css/ && ./node_modules/postcss-cli/bin/postcss --use autoprefixer app/css/style.css -d app/css/",
"watch-css": "nodemon -e scss -x 'npm run build-css'"