Skip to content

Instantly share code, notes, and snippets.

View skvoz's full-sized avatar

Perevozchykov Kostiantyn skvoz

View GitHub Profile
<?php
class Settings
{
/** static variable instance class
* @var Settings
*/
private static $_instance ;
/**
CSS 3D available, WebGL available
pano2vr_player.js:45 WebGL: INVALID_ENUM: enable: invalid capability
pano2vr_player.js:66 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
18detail?id=9:1 [.WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texImage2D: no texture
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texParameter: no texture
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texParameter: no texture
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texParameter: no texture
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texParameter: no texture
pano2vr_player.js:28 WebGL: INVALID_OPERATION: texImage2D: no texture
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-frontend',
# Created Tue May 5 13:28:50 EEST 2015
<VirtualHost *:80>
DocumentRoot "/Users/md101/Sites/business-card.local/frontend/web"
ServerName business-card.local
#ServerAlias your.alias.here
ScriptAlias /cgi-bin "/Users/md101/Sites/business-card.local/cgi-bin"
<Directory "/Users/md101/Sites/business-card.local/frontend/web">
Options All
AllowOverride All
@skvoz
skvoz / gist:233ec32096dfb0304a08
Created May 6, 2015 13:22
yii2 IDE autocompletion for custom components
<?php
/**
* Yii bootstrap file.
* Used for enhanced IDE code autocompletion.
*/
class Yii extends \yii\BaseYii
{
/**
* @var BaseApplication|WebApplication|ConsoleApplication the application instance
*/
@skvoz
skvoz / gist:2f9423ccff1b706570db
Created June 8, 2015 14:02
Mac OS X : Adding user groups and assigning read/write permission for the group to specific folder
//Adds new user group "dev" using Mac directory service command line utility
sudo dscl . -create /groups/dev
//Assigns some group id for the newly created group
sudo dscl . -append /groups/dev gid 2111
//Assigns password for the group
sudo dscl . -append /groups/dev passwd "xxxxx"
@skvoz
skvoz / gist:3fe365cad29a02855322
Created July 2, 2015 11:34
extended urlmanager in yii2
<?php
namespace frontend\components;
use yii\web\UrlManager;
use common\models\Lang;
class LangUrlManager extends UrlManager
{
public function createUrl($params)
{
@skvoz
skvoz / gist:dbdf0907fa864af9a496
Created July 3, 2015 07:40
query language Querying Elasticsearch
{
size: # number of results to return (defaults to 10)
from: # offset into results (defaults to 0)
fields: # list of document fields that should be returned - http://elasticsearch.org/guide/reference/api/search/fields.html
sort: # define sort order - see http://elasticsearch.org/guide/reference/api/search/sort.html
query: {
# "query" object following the Query DSL: http://elasticsearch.org/guide/reference/query-dsl/
# details below
},
@skvoz
skvoz / gist:219baa3eee76bee79c3c
Created August 31, 2015 07:28
js example oop
var account = {
warehouseId: 'warId',
warehouseHandler: function(){
this.warehouseId.on('click',funciton(){})
}
};
$(funciton(){
account.warehouseHandler();
})