Skip to content

Instantly share code, notes, and snippets.

View OndraM's full-sized avatar

Ondřej Machulda OndraM

View GitHub Profile
@OndraM
OndraM / .travis.yml
Created August 1, 2017 22:42
Travis CI: downgrade to PhantomJS 1.9.8 on Trusty builds
# Ubuntu Trusty is being rolled as default on Travis CI builds starting June 2017
# See https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming
# Ubuntu Trusty comes with PhantomJS 2.0.0, which breakes many things especially for Selenium WebDriver.
# Because of that you may want to downgrade to PhantomJS 1.9.8 (the same version Ubuntu Preciese has).
dist: trusty
install:
- phantomjs --version # will print 2.0.0
@OndraM
OndraM / AssertionClassExtension.php
Last active December 5, 2016 23:26
Basic PHPStan extension for beberlei/assertion library
<?php declare(strict_types = 1);
namespace PHPStan;
use Assert\Assertion;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\MethodsClassReflectionExtension;
class AssertionClassExtension implements MethodsClassReflectionExtension
@OndraM
OndraM / FacebookRequestParse.php
Created March 27, 2013 00:20
Parse signed data from Facebook in Zend Framework Action Helper (original spaghetti source: https://developers.facebook.com/docs/plugins/registration/)
<?php
class O_Controller_Action_Helper_FacebookRequestParse extends Zend_Controller_Action_Helper_Abstract
{
/**
* Parse and check Facebook signed request and return given data.
*
* Source: https://developers.facebook.com/docs/plugins/registration/
*
@OndraM
OndraM / index.html
Created April 16, 2012 19:41
jQuery form plugin issue #180 demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" media="screen" rel="stylesheet" type="text/css" >
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.form.js"></script>
</head>
<script>