Skip to content

Instantly share code, notes, and snippets.

View yellowgh0st's full-sized avatar
💭
📟⌨⌨🧬💾

Augustin Berisa yellowgh0st

💭
📟⌨⌨🧬💾
View GitHub Profile
@sethbergman
sethbergman / WP-HTML-Compression
Created November 3, 2015 03:27
Minify HTML for WordPress without a Plugin - Add to function.php
<?php
class WP_HTML_Compression
{
// Settings
protected $compress_css = true;
protected $compress_js = true;
protected $info_comment = true;
protected $remove_comments = true;
// Variables
@juanje
juanje / Description.md
Last active November 30, 2023 19:29
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }
@matthewjosephtaylor
matthewjosephtaylor / watch.sh
Created July 24, 2011 03:49
Bash shell script that watches a file and executes a command if the file changes.
#!/bin/sh
# Shell script that watches a file and executes a command if the file changes.
# Matt Taylor
# http://blog.matthewjosephtaylor.com
# License: This is free and unencumbered software released into the public domain.
# Thanks to code/tips from some helpful souls on irc.freenode.net ##unix
# All errors are of course my own. :)