Glossary:
- md: multiple devices
command | description |
---|---|
cat /proc/mdstat |
show status of all raids |
mdadm --detail /dev/md0 |
detailed status of raid md0 |
function password_encode(password) | |
local bcrypt = require 'bcrypt' | |
return bcrypt.digest(password, 12) | |
end | |
function check_password(password, encoded_password) | |
local bcrypt = require 'bcrypt' | |
return bcrypt.verify(password, encoded_password) | |
end |
server { | |
client_body_in_file_only clean; | |
client_body_buffer_size 32K; | |
client_max_body_size 300M; | |
sendfile on; | |
send_timeout 300s; | |
# Port that the web server will listen on. | |
#listen 80; |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
var http = require('http'); | |
var LISTEN_ON_PORT = 3000; | |
function toTitleCase(str) { | |
return str.replace(/[a-z]*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); | |
} | |
http.createServer(function (req, res) { | |
var body; |
#!/bin/bash -e | |
# Inspired by: https://github.com/adrienthebo/git-tools/blob/master/git-truncate | |
if [[ (-z $1) || (-z $2) ]]; then | |
echo "Usage: $(basename "$0") DROP_AT_SHA1 BRANCH" | |
exit 1 | |
fi | |
if [[ ! $1 =~ ^[0-9a-f]{7,40}$ ]]; then | |
echo "Error: invalid Git commit SHA1" >&2 |
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
<?php | |
/** | |
* This is an example of a practical encoder and decoder for base-62 data in PHP | |
* It differs from the majority of examples in that it's fast enough for moderate data sizes, unlike multiprecision converters | |
* To be practical, base-62 encoding needs to use internal chunking and padding because base-62 does not fit exactly into any integral number of bits | |
* This means the output is not quite compatible with multiprecision conversions, | |
* but the encoded data retains all the desirable properties of base-62, so (unlike any base-64 encoding) it's URL, DNS, email address and pathname safe | |
* @author Marcus Bointon <marcus@synchromedia.co.uk> | |
* @copyright 2011 Marcus Bointon | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License |