Skip to main content

Posts

Note Laravel query, Angular 2 ...

https://laravel-news.com/eloquent-tips-tricks     /**      * @param Request $request      * @param integer $bankId      * @param datetime $from      * @return \Illuminate\Http\JsonResponse      */     public function getBankFilesUploadedFromMonth(Request $request, $bankId = null)     {         $fromMonth = $request->get('fromMonth', '01');         $fromYear  = $request->get('fromYear', date('Y'));         $account = $request->get('user');         try {             if (!$account->isAdmin())                 $bank = $account->bank;             else                 $bank = $this->bankRepository->find($bankId, true);   ...

Laravel Job queue Supervisord and beanstalkd

   Active: inactive (dead) ubuntu@ip-172-31-29-15:/var/www/risk_advisor_dev/risk_advisor/API$ sudo service supervisor status ● supervisor.service - Supervisor process control system for UNIX    Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)    Active: active (running) since Wed 2018-09-05 02:44:50 UTC; 49min ago      Docs: http://supervisord.org   Process: 19220 ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown (code=exited, status=0/SUCCESS)  Main PID: 19223 (supervisord)     Tasks: 4    Memory: 111.6M       CPU: 1min 47.037s    CGroup: /system.slice/supervisor.service            ├─19223 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf            ├─19229 php /var/www/risk_advisor_dev/risk_advisor/API/artisan queue:listen --timeout=3000   ...

CMD 3

TASKKILL /F /IM httpd.exe /T C:\WINDOWS\system32>netstat -a -b |findstr /R /C:"80" https://stackoverflow.com/questions/76074/how-can-i-delete-a-service-in-windows SC QUERY state= all >"C:\Service List.txt" SC STOP shortservicename SC DELETE shortservicename SC QUERY state= all | FIND "_NAME"

XAMPP suck

<VirtualHost *:8080>    ServerAdmin ahihi@gmail.com    DocumentRoot "C:\Server\www\Org\APIOrg\public"    ServerName organi.uat.test.co    ErrorLog "logs/or.dev-error.log"    CustomLog "logs/or.dev-access.log" common </VirtualHost> <Directory "C:\Server\www\Org\APIOrg\public">         Options Indexes FollowSymLinks MultiViews         AllowOverride all         Order Deny,Allow         Allow from all         Require all granted </Directory> <VirtualHost *:8080> #   ServerAdmin ahihi@gmail.com    DocumentRoot "C:\Server\www\Org\SVN\Adminphase2"    ServerName admin.organi.uat.test.co #   ErrorLog "logs/or.dev-error.log" #   CustomLog "logs/or.dev-access.log" common    <Directory "C:\Server\www\Org\SVN\Adminphase2">         ...

Yith Woocommerce Subscription - Cancel the subscription billing in Stripe when customer doesn't finish/fail to pay the first payment

https://docs.yithemes.com/yith-woocommerce-subscription/premium-settings/suspension/ There are many defect card to test each response status. One of these is declined (before we get to thank you page). 4000000000009995 Charge is declined with a card_declined code. The decline_code attribute is insufficient_funds. If you have time, try these status, it may be useful and reduce confuse each time you touch these test. https://stripe.com/docs/testing Use Simply Show Hooks for faster find hook (than grep ?). It shine when we have to narrow down search scope (ie. error page).