I hereby claim:
- I am AndreiTelteu on github.
- I am andreitelteu (https://keybase.io/andreitelteu) on keybase.
- I have a public key whose fingerprint is 6D38 3885 8AB5 904A 4933 C7BA 101C E7AA 653C DAB7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Instead of searching on the ajenti.org website every time i want to install it, i copy and paste the code from this page.
wget -O- https://raw.github.com/Eugeny/ajenti/master/scripts/install-ubuntu.sh | sudo sh
You may need apt-get remove apache2
, and finaly
apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql
service ajenti restart
Install the json rest api wordpress plugin.
Include the following function in app/Controller/AppController.php
in your CakePHP instalation.
protected function _wpAPI($method='get', $url='/', $data=null)
{
App::uses('HttpSocket', 'Network/Http');
$http = new HttpSocket();
$http->configAuth('Basic', 'admin', 'password');
Create or open the file .git/hooks/pre-commit
and paste the following code inside it:
#!/bin/sh
mysqldump \
--no-data \
--dump-date=false \
--result-file=$PWD/dbdump.sql \
--log-error='/dev/null' \
--user='username' \
filter: #{'invert()'} |
<?php | |
function htmlentities_recursive($code) { | |
if (is_array($code)) | |
{ | |
foreach ($code as &$c) $c = htmlentities_recursive($c); | |
return $code; | |
} | |
return htmlentities($code); | |
} |
Just add this belongsToMany relations to your user model:
/*
* One user follows many users
*/
<?php | |
function caesar_cipher_smart($shift, $input) { | |
$a = str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); | |
$p = str_split($input); | |
foreach ($p as &$v) | |
if (($k = array_search($v, $a)) !== false) { | |
$t = $k+$shift; | |
if ($t < 0) $t = count($a)+$t; | |
$v = $a[$t]; |
Run command:
$ bash <(curl -L -s https://goo.gl/eax5A8)