Skip to content

Instantly share code, notes, and snippets.

View cbergau's full-sized avatar

Christian Bergau cbergau

  • Arvato eCommerce
  • Hannover (Germany)
View GitHub Profile
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
# Volumes:
# - /vagrant:/var/www/html Source code of the checkout
# - /home/vagrant:/home/vagrant Helper scripts of PHPStorm
# Environment Variables:
# - IDE_PHPUNIT_PHPUNIT_INCLUDE PHPStorm has a helper script that searches for PHPUnit. It's located under
# /home/vagrant/.phpstorm_helpers/phpunit.php if you need any more information
# - PHP_IDE_CONFIG PHPStorm maps it to the server configuration
# - XDEBUG_CONFIG XDebug configuration
#!/usr/bin/env bash
docker run --rm \
-v $(pwd):/var/www/html \
-e IDE_PHPUNIT_PHPUNIT_INCLUDE="/var/www/html/vendor/phpunit" \
-e PHP_IDE_CONFIG="serverName=my.local" \
-e XDEBUG_CONFIG="remote_host=192.168.178.22" \
cbergau/clean_architecture_shop_symfony3client \
php ./vendor/bin/phpunit -c tests/ tests/
@cbergau
cbergau / Windows GCLOUD Container Engine kubectl Problem
Created November 27, 2016 00:38
gcloud_windows_kubectl_auth_fix.md
After:
gcloud container clusters get-credentials cluster-1 --zone europe-west1-b --project xyz
kubectl proxy
I got the error message:
error: google: could not find default credentials.
Fix:
#include <iostream>
#include <windows.h>
int cmpfunc(const void * a, const void * b) {
return ( *(int*)a - *(int*)b );
}
int cstring_cmp(const void * a, const void * b) {
const char **ia = (const char **)a;
const char **ib = (const char **)b;
@cbergau
cbergau / c_uni.c
Last active December 13, 2016 22:49
#include <iostream>
#include <windows.h>
#include <stdio.h>
typedef struct person {
char *firstName;
char *lastName;
int yearOfBirthday;
char *job;
} PERSON;
const Hapi = require('hapi');
const server = new Hapi.Server();
server.connection({
port: 3000,
host: 'localhost'
});
server.route({
method: 'GET',
path: '/greet',
New Node Configuration
Node interpreter: C:\PathHere\node_modules\.bin\babel-node.cmd
Node parameters: --presets=babel_preset-es2015
Working directory: Working directory of your project, or project root
JavaScript file: node_modules\react-scripts\scripts\test.js
Application paramters: --env=jsdom
Environment variables: CI=true
@cbergau
cbergau / console
Last active December 20, 2017 22:07
<?php
// a:62:{s:15:"ALLUSERSPROFILE";s:14:"C:\ProgramData";s:16:"ANDROID_NDK_PATH";s:56:"C:\Users\Christian\Documents\Android\ndk\android-ndk-r8d";s:7:"APPDATA";s:34:"C:\Users\Christian\AppData\Roaming";s:18:"CommonProgramFiles";s:35:"C:\Program Files (x86)\Common Files";s:23:"CommonProgramFiles(x86)";s:35:"C:\Program Files (x86)\Common Files";s:18:"CommonProgramW6432";s:29:"C:\Program Files\Common Files";s:12:"COMPUTERNAME";s:12:"CHRISTIAN-PC";s:7:"ComSpec";s:27:"C:\WINDOWS\system32\cmd.exe";s:27:"DOCKER_TOOLBOX_INSTALL_PATH";s:31:"C:\Program Files\Docker Toolbox";s:30:"FPS_BROWSER_APP_PROFILE_STRING";s:17:"Internet Explorer";s:31:"FPS_BROWSER_USER_PROFILE_STRING";s:7:"Default";s:16:"FP_NO_HOST_CHECK";s:2:"NO";s:12:"GTK_BASEPATH";s:37:"C:\Program Files (x86)\GtkSharp\2.12\";s:4:"HOME";s:18:"C:\Users\Christian";s:9:"HOMEDRIVE";s:2:"C:";s:8:"HOMEPATH";s:16:"\Users\Christian";s:9:"JAVA_HOME";s:33:"C:\Program Files\Java\jdk1.7.0_45";s:8:"JRE_HOME";s:33:"C:\Program Files\Java\jdk1.7.0_45";s:12:"LOCALAPPDATA";s: