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
@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
<?php
namespace Neos\Crm\Api;
// CRM credentials
define('CLIENT_KEY', '');
define('CLIENT_SECRET', '');
define('API_KEY', '');
/*
<?php
// require_once('pubnub-lib/autoloader.php');
// use Pubnub\Pubnub;
// $pubnub = new Pubnub(array(
// 'subscribe_key' => '',
// 'publish_key' => 'f'
// ));
@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;

#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 / 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;
# 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 / laravel-notifications-talk-abstract.md
Last active November 13, 2018 06:19
The beauty of Laravel's notification system and how it helped me to create my first Laravel package

The beauty of Laravel's notification system and how it helped me to create my first Laravel package

Every modern application has some kind of notifications. This could be an E-Mail that informs the user about a new product, a note on the desktop that says a friendship request was accepted, a message on Slack that informs you about a successful build and so on. Laravel has a built-in notification system that makes all these tasks as simple as it can get. Let me show you how it works, how it helped me to create me first Laravel package and what the community has to offer to make notifications even more powerful. This is a practical approach to this topic and there will be some coding involved 😉

@christophrumpel
christophrumpel / gist:63732918166d2623dc65d14a88472139
Created April 11, 2019 19:01
Deskpro API Articles with artitcles
// https://helpdesk.steinbach.at/api/v2/articles?category[]=12
{
"data": [
{
"id": 23,
"person": 21,
"language": 2,
"slug": "die-pumpe-l-sst-sich-nicht-einschalten",
"title": "Die Pumpe lässt sich nicht einschalten.",
@christophrumpel
christophrumpel / PhpStorm - From a Fresh Install To A Master Setup.md
Last active January 20, 2020 09:06
PhpStorm - From a Fresh Install To A Master Setup

PhpStorm is one of the best IDE's for PHP available. It comes with a ton of features to make developing with PHP as easy as possible. But it is also this amount of possibilities that make it sometimes difficult to know what you want to use and where to find it.

Here comes the best feature of PhpStorm into play: Everything is customizable! Let's start with a fresh PhpStorm install and set it up together. We will make the theme look stunning and configure our Laravel application for testing, debugging, and your daily work with Laravel.

On the way, we will come across a lot of helpful little tips and tricks that you might not know yet. This talk will give you a crash course on how to use PhpStorm and what it has to offer for working with Laravel. Even if you're already working with it for a long time, you will get away with new learnings to improve your setup. Your IDE is one of your most essential tools. Let's master it!