Skip to content

Instantly share code, notes, and snippets.

View christophrumpel's full-sized avatar
🤠
PHP/Laravel Developer and Author

Christoph Rumpel christophrumpel

🤠
PHP/Laravel Developer and Author
View GitHub Profile
# This is a sample build configuration for Javascript (Node.js).
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:8
pipelines:
custom:
deploy:
@christophrumpel
christophrumpel / ApiDriver.php
Created February 15, 2017 13:16
BotMan ApiDriver Draft
<?php
namespace App\Chatbot\Conversations;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Cache;
use Mpociot\BotMan\Answer;
use Mpociot\BotMan\Drivers\Driver;
use Mpociot\BotMan\Facebook\ButtonTemplate;
use Mpociot\BotMan\Facebook\GenericTemplate;

#Best food in Vienna

  • Plachutta ($$$, great traditional Austrian food, delicate, several locations)
  • Zum Gschupftn Ferdl ($, hipster "Heuriger")
  • Bieramt ($, typical Austrian "Beisl", Homemade beer and best spareribs in town)
  • ON MARKET ($$, really good Asian food)
  • Flatschers ($$, great Burger and Steak restaurant)
@christophrumpel
christophrumpel / Apiai.php
Created January 6, 2017 11:02
BotMan API.ai middleware
<?php
namespace Mpociot\BotMan\Middleware;
use Illuminate\Support\Facades\Log;
use Mpociot\BotMan\Drivers\Driver;
use Mpociot\BotMan\Message;
use Mpociot\BotMan\Http\Curl;
use Mpociot\BotMan\Interfaces\HttpInterface;
use Mpociot\BotMan\Interfaces\MiddlewareInterface;
<?php
// require_once('pubnub-lib/autoloader.php');
// use Pubnub\Pubnub;
// $pubnub = new Pubnub(array(
// 'subscribe_key' => '',
// 'publish_key' => 'f'
// ));
<?php
namespace Neos\Crm\Api;
// CRM credentials
define('CLIENT_KEY', '');
define('CLIENT_SECRET', '');
define('API_KEY', '');
/*
@christophrumpel
christophrumpel / script.info
Last active January 24, 2016 14:37
Shell script read problem
Need to check input from the user in a script.
It seems there is no read version that works for zsh and normal bash.
(Error when using bash: read:27: -p: no coprocess with zsh)
This is why I tried to check if .zshrc file is given and depending on that I choose the read command.
But even if I try it like this, I get the error "read:27: -p: no coprocess" even if it shoudln't get called
because the file is given.
[ -f $file ] && read -q "reply?Answer: " || read -r -p "Answer: " reply
@christophrumpel
christophrumpel / debug_data.php
Last active February 23, 2016 10:03
CRM Create user data
array(8) {
["firstname"]=> string(14) "Test Christoph"
["lastname"]=> string(9) "Test Test"
["leadProcess"]=> int(552)
["leadStatus"]=> int(555)
["emails"]=> array(1) {
[0]=> array(2) {
["email"]=> string(25) "c.rumpel@liechtenecker.at"
["addressType"]=> int(1)
}
@christophrumpel
christophrumpel / gist:8397321
Created January 13, 2014 09:49
Laravel eager loading problem
// This is working
$fanpages = Fanpage::all();
// Loop through fanpages
foreach($fanpages as $fanpage) {
// Check if there are entries for yesterday (data date)
echo $fanpage->name;
return $fanpage->fanpageActivities()->get();
}
PAGER=cat rvm --trace notes
+__rvm_parse_args:686> [[ -n 4.3.11 ]]
+__rvm_parse_args:721> [[ -z '' && -n '' ]]
+__rvm_parse_args:724> [[ error == || 0 -eq 1 || -n '' ]]
+__rvm_parse_args:16> [[ -n notes ]]
+__rvm_parse_args:18> rvm_token=notes
+__rvm_parse_args:20> (( 0 > 0 ))
+__rvm_parse_args:25> next_token=''
+__rvm_parse_args:28> case notes ([[:alnum:]]*|@*)
+__rvm_parse_args:31> case notes (use)