This file contains hidden or 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
wget http://download.redis.io/redis-stable.tar.gz | |
tar xzvf redis-stable.tar.gz | |
cd redis-stable/deps | |
make hiredis jemalloc linenoise lua | |
cd .. | |
make install | |
sysctl vm.overcommit_memory=1 | |
sysctl -w fs.file-max=100000 |
This file contains hidden or 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
function validateNationalNumber(value) { | |
if (value == '0000000000' || | |
value == '1111111111' || | |
value == '2222222222' || | |
value == '3333333333' || | |
value == '4444444444' || | |
value == '5555555555' || | |
value == '6666666666' || | |
value == '7777777777' || | |
value == '8888888888' || |
This file contains hidden or 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
// get the path of php.ini in command line | |
php --ini | |
// get the current memory limit | |
php -r "echo ini_get('memory_limit').PHP_EOL;" | |
// Temporary change memory limit for composer | |
php -d memory_limit = 1024M composer.phar | |
// Get the current permission of file |
This file contains hidden or 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
$base-font-size: 18px; | |
// Convert PX to EM | |
@function em($px, $bfs: $base-font-size){ | |
@return ($px / $bfs) + 0em; | |
} | |
// Usage: | |
body { | |
font-size: em(24px); |
NewerOlder