Skip to content

Instantly share code, notes, and snippets.

pet the duck until exploded

Oleg Abrazhaev seyfer

pet the duck until exploded
View GitHub Profile
View generator.php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
// config
$config = new \Doctrine\ORM\Configuration();
View ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok, n1xim, pennedav, kabel)
Version: 0.2.0
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.2.0 0000-00-00 Updated page layout/styles and restructure code to be more MVC-like (kabel)
implemented HTTP Basic authentication (pennedav)
seyfer / gearmand
Created Feb 3, 2015
Gearman Daemon init.d for Debian
View gearmand
# Gearman server and library
# Copyright (C) 2013 Mostafa Amiri
# All rights reserved.
# Use and distribution licensed under the BSD license. See
# the COPYING file in this directory for full text.
seyfer / gist:2b9b9afb0fe556ad273e
Created Sep 25, 2015 — forked from snipe/gist:4256150
Apache Ant build.xml file for PHPUnit+Jenkins+Ant+Symfony2
View gist:2b9b9afb0fe556ad273e
<?xml version="1.0" encoding="UTF-8"?>
<!-- Set some basic project information and targets -->
<project name="My Symfony2 Project" default="build">
<target name="build"
depends="prepare, vendors, dbupdate, fixtures, lint, phploc, phpmd, phpcpd, phpcs, phpunit"/>
<target name="build-parallel"
depends="prepare, vendors, dbupdate, fixtures, lint, tools-parallel, phpcpd, phpunit"/>
seyfer / ant-composer.xml
Created Sep 25, 2015 — forked from cpliakas/ant-composer.xml
Apache Ant tagets for Composer commands.
View ant-composer.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Composer Targets" default="build">
<property name="builddir" value="${basedir}/build"/>
<property name="composer" value="${builddir}/composer.phar"/>
<target name="php-check">
<condition property="php" value="php">
<isset property="${php}"/>
seyfer / byzanz-record-window-gui
Created Mar 18, 2015
View byzanz-record-window-gui
# AUTHOR: (c) Rob W 2012, modified by MHC (
# NAME: GIFRecord 0.1
# DESCRIPTION: A script to record GIF screencasts.
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd)
# Time and date
TIME=$(date +"%Y-%m-%d_%H%M%S")
seyfer / apn-server.php
Last active Oct 11, 2017 — forked from samvermette/apn-server.php
Quickly send an Apple Push Notification using PHP
View apn-server.php
$apnsHost = '';
$apnsCert = 'ck.pem';
$apnsPort = 2195;
$apnsPass = '<PASSWORD_GOES_HERE>';
$payload['aps'] = array('alert' => 'Oh hai!', 'badge' => 1, 'sound' => 'default');
$output = json_encode($payload);
seyfer / gearmand
Created Feb 3, 2015
Gearmand init.d script
View gearmand
#! /bin/sh
# Provides: gearmand
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: gearmand
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
seyfer / feature-detect flexbox.js
Created Oct 23, 2018 — forked from davidhund/feature-detect flexbox.js
The simplest feature-detect for flexbox?
View feature-detect flexbox.js
* Trying to feature-detect (very naive)
* CSS Flexbox support.
* - Only most modern syntax
* Is this nonsense?
(function NaiveFlexBoxSupport(d){
var f = "flex", e = d.createElement('b');
seyfer / use-v-tooltip.vue
Last active Feb 19, 2020
Do not show v-tooltip for touch devices
View use-v-tooltip.vue
function isTouchDevice() {
const prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
const mq = function(query) {
return window.matchMedia(query).matches;
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
return true;
// include the 'heartz' as a way to have a non matching MQ to help terminate the join