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
# On Client | |
## Generate Key | |
ssh-keygen -t rsa {-b 4096} | |
## Copy identity to remote-host (requires remoteuser's password) | |
ssh-copy-id -i <path/to/public/key> <remoteuser>@<remotehost> | |
## or just copy the content of file ~/.ssh/id_rsa.pub on Client to the end of file ~/.ssh/authorized_keys on Server | |
## SSH |
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
insufficient[degs_, edgelist_, donelist_] := Catch[Module[ | |
{j, k, n = Length[degs], diff}, | |
For[j = 1; j <= n, j++, | |
If[degs[[j]] == 0, Continue[]]; | |
diff = degs[[j]] - Length[Union[donelist, edgelist[[j]]]]; | |
If[diff <= 0, Throw[True]]; | |
]; | |
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 name2Slug($name, $separator = '-', $maxLength = 40) | |
{ | |
$url = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $name); | |
$url = trim(substr(strtolower($url), 0, $maxLength)); | |
$url = preg_replace('/[^a-z0-9-]/', '-', $url); | |
$url = preg_replace('/'.$separator.'+/', '-', $url); | |
return $url; | |
} |
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
setfacl -R -m u:apache:rwX -m u:`whoami`:rwX app/cache app/logs | |
setfacl -dR -m u:apache:rwx -m u:`whoami`:rwx app/cache app/logs |
NewerOlder