Skip to content

Instantly share code, notes, and snippets.

View assada's full-sized avatar
🥒
Pickle Alex

Oleksii Ilienko assada

🥒
Pickle Alex
View GitHub Profile
var
app = require( 'express' )(),
mongoose = require( 'mongoose' ),
DB_URL = 'mongodb://localhost:27017/testDB';
var randomstring = require("randomstring");
mongoose.connect( DB_URL );
var
PeopleSchema = mongoose.Schema({ name: String, email: String, friends: Array }),
People = mongoose.model( 'People', PeopleSchema ),
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
@assada
assada / php
Created September 3, 2015 09:12
<?php
/**
* MODX Configuration file
*/
$database_type = 'mysql';
$database_server = 'localhost';
$database_user = 'u_debentures';
$database_password = 'YeDuz1DT';
$database_connection_charset = 'utf8';
$database_connection_method = 'SET NAMES';
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !VAR1 EVAL("var content='BLABLA'; content;")
SET !VAR2 EVAL("var random=Math.floor(Math.random()*4+1); random;")
SET !VAR3 EVAL("var random=Math.floor(Math.random()*2+1); random;")
SET !VAR4 EVAL("var random=Math.floor(Math.random()*6+1); random;")
SET !VAR5 EVAL("var random=Math.floor(Math.random()*5+1); random;")
SET !VAR6 EVAL("var random=Math.floor(Math.random()*7+1); random;")
SET !VAR7 EVAL("var random=Math.floor(Math.random()*3+1); random;")
[Wed Nov 04 14:35:15.101688 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP Fatal error: Call to a member function getId() on boolean in /var/www/api.dev/api_V2/modules/crm/controllers/CustomersController.php on line 419
[Wed Nov 04 14:35:15.101715 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP Stack trace:
[Wed Nov 04 14:35:15.101722 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP 1. {main}() /var/www/api.dev/api_V2/clients/assada/index.php:0
[Wed Nov 04 14:35:15.101726 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP 2. Application->run() /var/www/api.dev/api_V2/clients/assada/index.php:22
[Wed Nov 04 14:35:15.101730 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP 3. Phalcon\\Mvc\\Application->handle() /var/www/api.dev/api_V2/bootstrap.php:175
[Wed Nov 04 14:35:15.101734 2015] [:error] [pid 6369] [client 127.0.0.1:45258] PHP 4. Phalcon\\Dispatcher->dispatch() /var/www/api.dev/api_V2/bootstrap.php:175
[Wed Nov 04 14:35:15.101737 2015] [:error] [pid 6369] [client 12
@assada
assada / php
Created November 6, 2015 14:10
array (size=4)
'id' => int 23
'name' => string 'Тестовая компания' (length=33)
'legalForm' =>
array (size=3)
'id' => int 5
'fullName' => string 'Обществo с ограниченной ответственностью' (length=76)
'shortName' => string 'ООО' (length=6)
'contacts' =>
array (size=2)
array (size=4)
'id' => int 23
'name' => string 'Тестовая компания' (length=33)
'legalForm' =>
array (size=3)
'id' => int 5
'fullName' => string 'Обществo с ограниченной ответственностью' (length=76)
'shortName' => string 'ООО' (length=6)
'agents' =>
array (size=1)
array (size=4)
'human' =>
array (size=11)
'firstName' => string 'Имя1' (length=7)
'secondName' => string 'Фамилия2' (length=15)
'middleName' => string 'Отчество3' (length=17)
'gender' => string 'M' (length=1)
'birthday' => string '2015-11-12' (length=10)
'passportSe' => null
'passportNo' => null
@assada
assada / xjedi.js
Last active December 31, 2015 20:09
(function myLoop (i) {
setTimeout(function () {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'http://xjedi.com/forum/index.php?act=rep&type=add&mid='+i+'&message=Happy%20New%20Year!', true);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
if(xmlhttp.status == 200) {
clearTimeout(timeout);
console.info('User #'+i+' +');
}
<?php
use tests\codeception\_pages\LoginPage;
/* @var $scenario Codeception\Scenario */
$I = new FunctionalTester($scenario);
$I->wantTo('ensure that login works');
$loginPage = LoginPage::openBy($I);