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
# Ignore everything in the root except the "wp-content" directory.. | |
/ | |
/wp-config.php | |
/local-config.php | |
/remote-config.php | |
!.gitignore | |
!wp-content | |
wp-includes | |
wp-admin | |
wp-snapshots |
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
/** | |
* original: http://pastebin.com/mnznDg7q | |
* by @grumblerbear | |
* | |
* Пример: | |
* 1, ['сайт', 'сайта', 'сайтов'] | |
* Результат: | |
* 'сайт' | |
* | |
* Пример: |
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
var express = require('express'), | |
// ... other packages | |
sass = require('node-sass'); | |
// ... | |
var app = express(); | |
// ... | |
// Commented this default express generator line: | |
// app.use(require('stylus').middleware(path.join(__dirname, 'public'))); | |
// |
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
app.post('/login', function(req, res) { | |
console.log(res); | |
passport.authenticate('local', function(err, user, params) { | |
if (req.xhr) { | |
//thanks @jkevinburton | |
if (err) { return res.json({ error: err.message }); } | |
// e.g. in auth.js: | |
// if (!user.emailVerified) { return done(null, false, { message: 'Email is not verified. Please check your email for the link.' }); } | |
if (!user && params) { return res.json({error : params.error}); } |
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
<?php | |
/** | |
* Define type of server | |
* | |
* Depending on the type other stuff can be configured | |
* Note: Define them all, don't skip one if other is already defined | |
*/ | |
define( 'DB_CREDENTIALS_PATH', dirname( ABSPATH ) ); // cache it for multiple use |
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
.e_checkbox, | |
.e_radiobox { | |
position: relative; | |
display: inline-block; | |
width: 17px; | |
height: 17px; | |
margin-right: 5px; | |
} |
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
# Virtual Hosts | |
# | |
<VirtualHost *:80> | |
DocumentRoot "c:\wamp\www\family-beetroot" | |
ServerName family_br.loc | |
</VirtualHost> |
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
<?php | |
App::error(function(Exception $exception, $code) | |
{ | |
Log::error($exception); | |
// Save data to the database | |
$getUser = ''; | |
// .... |
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
<?php | |
class Profile extends CActiveRecord | |
{ | |
public function attributeLabels() | |
{ | |
return array( | |
'id' => Yii::t('model', 118), | |
'from' => Yii::t('model', 119), | |
'email' => Yii::t('model', 120), | |
'user_id' => Yii::t('model', 121), |
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
// fix jqueryui resizable bug: | |
// | |
// jqueryui resizable on 'resize' event invokes | |
// window.resize event, which maybe unwanted behaviour sometimes | |
// | |
window.onresize = function(event) { | |
if (typeof event.target.getAttribute === 'function') | |
return; | |
}; |