Skip to content

Instantly share code, notes, and snippets.

View EnchanterIO's full-sized avatar

Lukáš Lukáč EnchanterIO

View GitHub Profile
@EnchanterIO
EnchanterIO / gist:ccbc1d0f9b99bd2c6adc69027c147dd6
Created September 25, 2017 09:11
List of AdWords operations for BatchJob
array(15) {
[0] =>
class Google\AdsApi\AdWords\v201705\cm\BudgetOperation#532 (4) {
protected $operand =>
class Google\AdsApi\AdWords\v201705\cm\Budget#539 (7) {
protected $budgetId =>
int(491348949)
protected $name =>
string(34) "UK_en_Search_Poi_B_POIHostel_BMM_A"
protected $amount =>
@EnchanterIO
EnchanterIO / query_builder_sub_query.php
Created September 26, 2015 17:31
Symfony queryBuilder subquery
/**
* @param User $user
* @param int $limit
* @param int $offset
* @return User[]
*/
public function getUserFollowers(User $user, $limit = 20, $offset = 0)
{
$_followersIds = $this->getEntityManager()
->createQueryBuilder()
@EnchanterIO
EnchanterIO / segment error
Created December 27, 2014 21:17
segment error
[Thu Dec 25 13:04:06.156659 2014] [auth_digest:notice] [pid 4997] AH01757: generating secret for digest authentication ...
[Thu Dec 25 13:04:06.157006 2014] [lbmethod_heartbeat:notice] [pid 4997] AH02282: No slotmem from mod_heartmonitor
[Thu Dec 25 13:04:06.176200 2014] [mpm_prefork:notice] [pid 4997] AH00163: Apache/2.4.6 (CentOS) PHP/5.5.18 configured -- resuming normal operations
[Thu Dec 25 13:04:06.176216 2014] [core:notice] [pid 4997] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
zend_mm_heap corrupted
zend_mm_heap corrupted
Not a JPEG file: starts with 0x42 0x4d
Not a JPEG file: starts with 0x42 0x4d
libpng warning: Incorrect sBIT chunk length
[Sat Dec 27 09:05:08.347165 2014] [core:notice] [pid 4997] AH00052: child pid 28443 exit signal Segmentation fault (11)
@EnchanterIO
EnchanterIO / gist:b9c1c2e1d04b53d4003c
Created November 3, 2014 14:48
controller example
'use strict';
Challenge
.controller('challengeCtrl', ['$scope','$routeParams', '$location','$timeout', 'Challenge','CUPLOAD','MB','UploadHelper','$modal','$filter', 'usSpinnerService','Trans',
function($scope, $routeParams, $location, $timeout, Challenge, CUPLOAD, MB, UploadHelper, $modal, $filter, spinner, Trans) {
Trans.load('challenges');
'use strict';
// Declare app level module which depends on filters, and services
var alApp = angular.module('alApp',
[
...
, 'login'
...
]
→ ./node_modules/protractor/bin/protractor protractor_conf.js
Using ChromeDriver directly...
F
Failures:
1) hello-protractor index should display the correct title
Message:
Expected 'Mwuha' to be 'Some fake title'.
Stacktrace:
@EnchanterIO
EnchanterIO / gist:10919425
Created April 16, 2014 18:46
karma e2e config file
// Karma configuration
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['ng-scenario'],
@EnchanterIO
EnchanterIO / gist:10919353
Created April 16, 2014 18:46
karma config file
// Karma configuration
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh