# Install required packages
sudo apt-get install git make ruby-sass
# Keep all the stuff together
mkdir mint
cd mint
# Clone the repository
git clone https://github.com/linuxmint/mint-themes.git
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 | |
sudo apt install fontconfig | |
cd ~ | |
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip | |
mkdir -p .local/share/fonts | |
unzip Meslo.zip -d .local/share/fonts | |
cd .local/share/fonts | |
rm *Windows* | |
cd ~ |
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
// http://stackoverflow.com/questions/1219860/javascript-jquery-html-encoding | |
function htmlEncode(value){ | |
return $('<div/>').text(value).html(); | |
} | |
function htmlDecode(value){ | |
return $('<div/>').html(value).text(); | |
} |
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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder] |
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
/** | |
* Check if a given ip is in a network | |
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
* @return boolean true if the ip is in this range / false if not. | |
*/ | |
function ip_in_range( $ip, $range ) { | |
if ( strpos( $range, '/' ) == false ) { | |
$range .= '/32'; | |
} |
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
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |
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
<?php | |
/** | |
* Minify HTML output (HTML) | |
* | |
* How to use: | |
* | |
* Call function using ob_start(); | |
* | |
* if(extension_loaded('zlib') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE){ |
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
<?php | |
function validaCPF($cpf) { | |
// Extrai somente os números | |
$cpf = preg_replace( '/[^0-9]/is', '', $cpf ); | |
// Verifica se foi informado todos os digitos corretamente | |
if (strlen($cpf) != 11) { | |
return false; |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export ANDROID_HOME=~/Android/Sdk | |
export PATH="$PATH:$ANDROID_HOME/tools" | |
export PATH="$PATH:$ANDROID_HOME/platform-tools" | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/diegofernandes/.oh-my-zsh" | |
export PATH="$PATH:/usr/local/bin" |
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
FROM owncloud:latest | |
RUN \ | |
apt-get update && \ | |
apt-get install libldap2-dev -y && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \ | |
docker-php-ext-install ldap |
NewerOlder