Skip to content

Instantly share code, notes, and snippets.

View aik099's full-sized avatar

Alex aik099

View GitHub Profile
@aik099
aik099 / vimeo-downloader.js
Last active September 4, 2023 13:37 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');
@aik099
aik099 / GamerElement.php
Last active April 9, 2016 14:15
QA-Tools usage example for gamer location
<?php
use QATools\QATools\HtmlElements\Element\AbstractElementContainer;
use QATools\QATools\HtmlElements\Element\Link;
use QATools\QATools\HtmlElements\Element\TextBlock;
/**
* @find-by('css' => 'li.gamer')
*/
class GamerElement extends AbstractElementContainer
@aik099
aik099 / excuted_via_plain_proc_open.txt
Created August 28, 2015 11:10
Comparing output of /usr/bin/mcedit when executed via Symfony Process and via plain proc_open
[?1049h(B(B

[?1049l[?1001s[?1002h[?1049h[?1h=(B [----] 0 L:[ 1+ 0 1/ 1] *(0 / 0b) <EOF>







@aik099
aik099 / phpunit_output.txt
Created June 4, 2015 08:01
PHP_CodeSniffer tests executed on PHP7
→ /usr/local/php-7.0/bin/php ~/.composer/vendor/bin/phpunit
PHPUnit 4.6.10 by Sebastian Bergmann and contributors.
Configuration read from /mnt/hd/home/alex/web/g/_other/PHP_CodeSniffer/phpunit.xml
................................S...........................SS. 63 / 222 ( 28%)
............................................................... 126 / 222 ( 56%)
.........F......F.............................................. 189 / 222 ( 85%)
......S..........................
@aik099
aik099 / after_fixing.php
Created December 28, 2014 19:12
Example file to demonstrate fixing issue with "Squiz.WhiteSpace.FunctionSpacing" sniff in PHP_CodeSniffer
<?php
class FedExShippingQuotingEngine extends ShippingQuoteEngine
{
function GetTrack($tracking_number)
{
$path_to_wsdl = realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR . $this->GetWsdlFolder() . DIRECTORY_SEPARATOR.'TrackService_v9.wsdl';
ini_set('soap.wsdl_cache_enabled', '0');
@aik099
aik099 / e_user_tp.php
Created December 23, 2014 20:16
Squiz.FunctionComment sniff file to fix
<?php
defined('FULL_PATH') or die('restricted access!');
/**
* Extends default UsersTagProcessor class
*
*/
class EUserTagProcessor extends UsersTagProcessor {
@aik099
aik099 / ScopeIndentSniff.php
Created October 16, 2014 17:35
Magento_Sniffs_WhiteSpace_ScopeIndentSniff
<?php
/**
* Magento_Sniffs_WhiteSpace_ScopeIndentSniff
*
* @category CodeSniffer
* @package CodeSniffer_Magento
* @author Volodymyr Fesko <volodymyr.fesko@smile.fr>
* @copyright 2014 Smile
*/
@aik099
aik099 / SampleWorkflowTest.php
Created October 10, 2014 20:31
Example file for PHP_CodeSniffer to demonstrate issues with DocCommentSniff
<?php
namespace InPortal\Modules\Custom\tests;
use Behat\Mink\Element\NodeElement;
use InPortal\Core\kernel\tests\BrowserTestCase;
class SampleWorkflowTest extends BrowserTestCase
{
@aik099
aik099 / laravel_42_aliases_dump.php
Last active August 29, 2015 14:07
Comparing Laravel 4.2 and 4.3 config/app.php
Array
(
[Illuminate\Foundation\Application] => app
[Illuminate\Console\Application] => artisan
[Illuminate\Auth\AuthManager] => auth
[Illuminate\Auth\Reminders\ReminderRepositoryInterface] => auth.reminder.repository
[Illuminate\View\Compilers\BladeCompiler] => blade.compiler
[Illuminate\Cache\CacheManager] => cache
[Illuminate\Cache\Repository] => cache.store
[Illuminate\Config\Repository] => config
@aik099
aik099 / TestPrivateInheritance.php
Created August 24, 2014 12:21
Testing private property/method inheritance in PHP
<?php
class PrivateBase
{
private $privateProperty = 5;
private function privateMethod()
{
echo 'PrivateBase:'.$this->privateProperty;