Skip to content

Instantly share code, notes, and snippets.

Dmytro Kolesnykov kastaneda

  • Ukraine
Block or report user

Report or block kastaneda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 000-default.conf
# /etc/apache2/sites-available/000-default.conf
<IfModule mod_vhost_alias.c>
<VirtualHost *:80>
# Mass virtual hosting
ServerAlias *
UseCanonicalName Off
VirtualDocumentRoot "/var/www/vhosts/%0"
@kastaneda
kastaneda / webcam.sh
Created Oct 31, 2018
Copy image from specified webcam in specified resolution to X11 clipboard
View webcam.sh
fswebcam -d /dev/video0 -r 800x600 - | convert - png:- | xclip -se c -t image/png -i
View docker-compose.yml
version: '3'
services:
php:
image: php:7-fpm
volumes:
- ./app:/app:rw
- ./php-misc.ini:/usr/local/etc/php/conf.d/docker-php.ini:ro
web:
image: nginx:latest
View composer.json
{
"require": {
"twbs/bootstrap": "^3.3",
"jquery/jquery": "3.2.1"
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
View loan_calculator.php
<?php
/**
* Simple Loan Calculator
*
* This is standalone web application. It can calculate loan amortization
* schedule based on amount of requested loan, annual interest rate, loan
* fee and duration of the loan in months. Linear and annuity payment
* methods are supported.
*
View money.php
<?php
class Currency
{
/** @var string */
private $literalCode;
/** @var int */
private $numericCode;
View gist:d191848a55ea891b7138
<?php
interface ClassGenerator
{
/**
* @return string
*/
public function getClassName();
/**
View gist:9ff5adc0c39f333803e9
CREATE TABLE players (
player_id INT AUTO_INCREMENT NOT NULL,
player_name VARCHAR(255) NOT NULL,
PRIMARY KEY(player_id)
);
INSERT INTO players (player_name) VALUES
('Sasha'),
('Kris'),
View gist:ca958adb3d102c4f17a4
<?php
use Psr\Log\LogLevel;
/**
* Dump just everything to da fokkin' stdout, yeah!
*/
class StdoutDebugLogger extends Psr\Log\AbstractLogger
{
protected $useAnsiCodes = false;
View gist:7252339
<?php
class MyDevelopmentServiceManager
{
protected $factories = array(
'Foo' => '\MyModule\Foo',
'Bar' => '\MyModule\Bar',
);
protected $instances;
You can’t perform that action at this time.