This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createStore({ state, mutations }) { | |
return { | |
state: Vue.observable(state), | |
commit(key, ...args) { | |
mutations[key](state, ...args) | |
} | |
} | |
} | |
const store = createStore({ | |
state: { count: 0 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function index(Request $request) | |
{ | |
$sortBy = 'id'; | |
$orderBy = 'desc'; | |
$perPage = 20; | |
$q = null; | |
if ($request->has('orderBy')) $orderBy = $request->query('orderBy'); | |
if ($request->has('sortBy')) $sortBy = $request->query('sortBy'); | |
if ($request->has('perPage')) $perPage = $request->query('perPage'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:{window.location='https://ohdear.app/tools/reachable?prefill='+encodeURIComponent(window.location.href)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function chain($object) | |
{ | |
return new class ($object) { | |
protected $lastReturn = null; | |
public function __construct($object) | |
{ | |
$this->wrapped = $object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean mediate(MessageContext context) { | |
try { | |
String test = context.getProperty("mock_property").toString(); | |
OMElement xmlPayload = AXIOMUtil.stringToOM(test); | |
//log.info(xmlPayload); | |
OMElement envelope = context.getEnvelope().getBody().getFirstElement(); | |
//log.info(envelope); | |
OMElement body = envelope.getFirstElement(); | |
//log.info(body); | |
OMElement items = body.getFirstElement(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\NotificationChannels\Discord; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\RequestOptions; | |
use Illuminate\Notifications\Notification; | |
class DiscordChannel | |
{ |
This gist describes two processes allowing us to access the Google API and to register some webhooks. At the end of both processes we will obtain all variable needed to start using their API and we will have whitelisted all necessary URL to get started. We will be using the Google Calendar API and the Google Plus API to access the email address of the user.
This gist has been created as an Appendix to this article (part 1) and this article (part 3).
Note that, I will be using a randomly generated ngrok domain during this presentation. Simply replace b3093b51.ngrok.io
with your domain name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Traits; | |
use KushyApi\User; | |
trait AttachJwtToken | |
{ | |
/** | |
* @var User |