Documentation: http://natanfelles.github.io/docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#e04028, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup specific directories to external disk | |
# Created by Natan Felles | |
# Install rsync to do this script work. Execute "apt-get install rsync" in Debian distros | |
# To discover the UUID of the external disk, use gnome-disks ou execute "blkid" | |
# Do not forget to configure the variables LOGDIR, LOGFILE, DIRS and UUID | |
# Local log dir path | |
LOGDIR=/var/log/backup/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Location: /etc/nginx/sites-available/domain.tld.conf | |
server { | |
listen 80; | |
# listen 443 ssl; | |
# include snippets/snakeoil.conf; | |
root /var/www/domain.tld/public; | |
index index.html index.php; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Location: ~/.config/terminator/config | |
# Numix Dark | |
[global_config] | |
title_hide_sizetext = True | |
hide_from_taskbar = True | |
suppress_multiple_term_dialog = True | |
handle_size = 3 | |
tab_position = hidden | |
[keybindings] | |
[profiles] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update-rc.d -f nginx disable; | |
update-rc.d -f php5-fpm disable; | |
update-rc.d -f mysql disable; | |
update-rc.d -f memcached disable; | |
update-rc.d -f fcgiwrap disable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alguns softwares, como google-earth e steam, necessitam da arquitetura i386 | |
# dpkg --add-architecture i386 | |
firmware-linux-free | |
firmware-linux-nonfree | |
firmware-realtek | |
terminator | |
vim-nox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gist { | |
color: #000; | |
} | |
.gist div { | |
padding: 0; | |
margin: 0; | |
} | |
.gist .gist-file { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="http://yandex.st/highlightjs/7.0/styles/default.min.css" rel="stylesheet"> | |
<script src="http://yandex.st/highlightjs/7.0/highlight.min.js"></script> | |
<script type='text/javascript'> $(document).ready(function() { | |
function fixup(s) { | |
var re1 = new RegExp('<','g'), re2 = new RegExp('>','g'); | |
return s.replace(re1,'<').replace(re2,'>'); | |
} | |
$.ajax({type: "GET", | |
url: "https://api.github.com/gists/5617520", |
Source: https://github.com/bcit-ci/CodeIgniter/wiki/Compress-HTML-output
To remove useless whitespace from generated HTML, except for Javascript see [Regex Source] or just replace the $re
value:
$re = '%# Collapse ws everywhere but in blacklisted elements.
(?> # Match all whitespaces other than single space.
[^\S ]\s* # Either one [\t\r\n\f\v] and zero or more ws,
| \s{2,} # or two or more consecutive-any-whitespace.
) # Note: The remaining regex consumes no text at all...
OlderNewer