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
const arr = [2, [4, 3, [7, 6]]]; | |
const flatArr = []; | |
const flat = arr => { | |
if (!Array.isArray(arr)) { | |
flatArr.push(arr); | |
return | |
} |
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
{"1750":"pls","5110":"kdh","5330":"kdh","7520":"kdh","8170":"kdh","10000":"png","10020":"png","10050":"png","10100":"png","10110":"png","10150":"png","10160":"png","10200":"png","10250":"png","10300":"png","10350":"png","10400":"png","10420":"png","10450":"png","10460":"png","10470":"png","10500":"png","10502":"png","10503":"png","10504":"png","10505":"png","10506":"png","10508":"png","10512":"png","10514":"png","10516":"png","10518":"png","10520":"png","10524":"png","10534":"png","10538":"png","10540":"png","10542":"png","10546":"png","10550":"png","10551":"png","10552":"png","10558":"png","10560":"png","10564":"png","10566":"png","10570":"png","10576":"png","10578":"png","10582":"png","10590":"png","10592":"png","10593":"png","10594":"png","10596":"png","10600":"png","10604":"png","10609":"png","10610":"png","10612":"png","10620":"png","10622":"png","10626":"png","10628":"png","10634":"png","10646":"png","10648":"png","10660":"png","10661":"png","10662":"png","10668":"png","10670":"png","10672":"png","10673 |
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
const cote = require('cote'); | |
const requester = new cote.Requester({ | |
name: 'test caller', | |
key: 'test' | |
}); | |
const responder = new cote.Responder({ | |
name: 'test responder', | |
key: 'test' | |
}); | |
responder.on('ping', (req, cb) => { |
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
const chai = require('chai'); | |
const chaiAsPromised = require('chai-as-promised'); | |
const { should, expect } = chai; | |
chai.should(); | |
chai.use(chaiAsPromised); | |
const { User } = require('../models/index'); | |
const AuthController = require('../controllers/auth'); |
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
const chai = require('chai'); | |
const chaiAsPromised = require('chai-as-promised'); | |
const { should, expect } = chai; | |
chai.should(); | |
chai.use(chaiAsPromised); | |
const { User } = require('../models/index'); | |
const AuthController = require('../controllers/auth'); |
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; | |
use App\Traits\Braintree\Helpers; | |
use App\Traits\Braintree\Base; | |
use App\User; | |
use App\PaymentMethod; | |
use App\Jobs\PaymentMethod\DeleteCard; |
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\Contracts; | |
use App\User; | |
use App\Card; | |
interface PaymentGateway { | |
public function getPaymentMethodNonce( User $user ); | |
public function createCustomer( User $user ); |
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\Modules; | |
use App\User; | |
use App\Services\BraintreeService; | |
class BillingModule { |
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\Providers; | |
use App\Modules\AccountModule; | |
use App\Modules\SubscriptionModule; | |
use App\Modules\BillingModule; | |
use App\Modules\ProjectModule; | |
use App\Modules\RecordModule; | |
use App\Modules\SensorModule; |
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 removePaymentMethod( PaymentMethod $paymentMethod, User $user ) { | |
dispatch(new DeleteCard($paymentMethod, $user)); | |
// delete local db. | |
$paymentMethod->delete(); | |
return; | |
} |
NewerOlder