Skip to main content

Posts

Showing posts from January, 2019

BlackBerry Android drama

Q10 10.3.2.2876 Android drama and many other issues Install Google https://forums.crackberry.com/blackberry-10-os-f269/cobalts-official-google-apps-landing-page-965257/ Play Store https://forums.crackberry.com/android-apps-amazon-store-apk-files-f413/google-play-store-blackberry-10-read-first-post-instructions-985344/#post11189556 Problem with 10.3.2.2876 https://forums.crackberry.com/blackberry-10-os-f269/os-10-3-2-2876-android-runtime-analysis-1058115/#post12206982 https://mega.nz/#F!lIUWjSSQ!yoLoiNX3PNG3Sef1Fa_fMA

microservice note 2

matrix microsv modify email, live chargify … with dump concat _ofs_dev make sure local app/web not send mail or something affect LIVE users, DB. https://github.com/mybatis/migrations https://flywaydb.org/ https://dba.stackexchange.com/questions/20/how-can-i-optimize-a-mysqldump-of-a-large-database http://jailer.sourceforge.net/ http://www.liquibase.org/ https://martinfowler.com/articles/schemaless/#storage font marydale https://martinfowler.com/bliki/CanaryRelease.html fff run how many DB ? how many RDBMS, how many schemaless ? each studio run a version of system + DB or similar ? simulate search function postman create/request acc mysql Read-only + and/or implement additional filter/verify before WRITE data to avoid mistake overwrite  clever way to selective backup Live DB schedule. Avoid huge table if possible (ie. log, not important table) minimize time run on migrate to acceptable degree in order to avoid bad user exp. + avoid exception, error whe

Note AWS, cloud 5

php artisan down do what ? put app to maintenance mode. https://medium.com/stashaway-engineering/deploying-a-self-contained-maintenance-page-on-aws-ad4ec8e0a736 heroku have setting for that (cool) https://stackoverflow.com/questions/13693947/how-do-you-put-up-a-maintenance-page-for-aws-when-your-instances-are-behind-an-e May be these thing like this make heroku shine here. WP   can be set maintenance mode too ? pp complain ab WP but sometime it shine. php artisan down not posible in cloud (ie. ELB beanstalk...) => where VPS shine ? http://v2.wp-api.org/extending/adding/#the-controller-pattern https://dba.stackexchange.com/questions/86783/converting-heap-to-myisam-issue https://forums.mysql.com/read.php?22,111012,202235 https://aws.amazon.com/premiumsupport/knowledge-center/troubleshoot-http-5xx/ https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html My bg task stop when lock screen. hmm lost few hour of data. https://apple.stackexch

eb healthcheck.rb

rb code monitoring & send report HEALTH check [ec2-user@ip-172-31-19-129 ~]$ cat /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/healthd-appstat-1.0.1/lib/healthd-appstat/plugin.rb require 'healthd/daemon/exceptions' require 'healthd/daemon/logger' require 'healthd/daemon/plugins/batch_base' require 'healthd/daemon/model/statistic' require 'healthd-appstat/log_file' require 'healthd-appstat/http_status_counters' require 'x-digest' require 'chainsaw' module Healthd     module Plugins         module Appstat             class Plugin < Daemon::Plugins::BatchBase                 namespace "application"                 @@pattern = %["]                 @@units = %w[sec usec]                 @@timestamp_on_values = %w[completion arrival]                 @@unit = @@units.first                 @@timestamp_on = @@timestamp_on_values.first                 attr_accessor :path, :xdig

Dictionary / Translator app design

https://www.quora.com/Is-Google-Translator-the-best-among-all Does it work and how? However, whatever the technology is used for development of Google Translate software, the quality of the outcome depends on several factors.     Language Pair or language combination. Why? Because Google does not so much generate some tricky and fancy translations out of nothing. It has a database of ready made translations. Where they were all taken from? They were all taken from works done by real translators. And the more translators available for particular language pair the higher quality of translation can be. English to German translation or English to French translation can be a good example of better quality in Google Translate. The rest of languages can leave much to be desired, like in case with English to Russian translation or English to Turkish translation.     Subject matter. The quality of specific translation also depends on the language pair. The more professional translators are in

Note aws 4

AWS Elastic Beanstalk has two types of environment tiers to support different types of web applications. Web servers are standard applications that listen for and then process HTTP requests, typically over port 80. Workers are specialized applications that have a background processing task that listens for messages on an Amazon SQS queue. Worker applications post those messages to your application by using HTTP. aha, build.yml version: 0.1 phases:   build:     commands:       - echo Build started on `date`       - cp ./config/firebase-develop.json.example ./config/firebase-develop.json artifacts:   files:     - '**/*' Warning You may not be able to connect to this instance as ports 22 may need to be open in order to be accessible. Your current security groups don't have ports 22 open. Instance is not associated with a key pair This instance is not associated with a key pair. Without a key pair you will need to log into this instance using a valid userna

Load testing API, LoadImpact, NewRelic, AWS computing, CPU credit, k6 cli...

https://github.com/loadimpact/k6 Price quite high but understandable compared to another service like BrowserStack, New Relic https://loadimpact.com/pricing/#annually Random pop out https://www.techradar.com/news/captcha-if-you-can-how-youve-been-training-ai-for-years-without-realising-it https://stackoverflow.com/questions/28984106/what-is-cpu-credit-balance-in-ec2 https://aws.amazon.com/ec2/instance-types/ Compared to DO smallest 1GB memory, 1CPU (Xeon E520 ? 2.2GHz) https://www.digitalocean.com/pricing/ k6 (loadimpact cli) seem not limit VUs (virtual user) since it run on client machine, use client resources. So cool. But with 1000 vus, even MBP 2017 seem lagging. Digital Ocean cheapest 5$ seem take a while to ready test with 100 vus Auto restart https://forums.aws.amazon.com/thread.jspa?threadID=165405 https://stackoverflow.com/questions/19835455/how-to-restart-node-application-automatically-on-aws-elastic-beanstalk/28986288 My bss suggest use /healthcheck, whe

AVCONV, FFMPEG library added to build Docker image, Lossless MP4 audio extract

One of my project need lib libav-tools or ffmpeg, mediainfo for some image, video thumbnail generate, get info... I see that this is may be overkill when added a quite big lib for only some simple task. But it seems there are not any more lightweight lib available. My Docker image is a special (?) Aptible image for Express JS app (It's based on Alpine distro). My Docker image file: FROM quay.io/aptible/nodejs:v6.9.x ADD package.json /app/ WORKDIR /app RUN apt-install build-essential RUN apt-install g++ RUN apt-install python RUN apt-install libav-tools RUN apt-install mediainfo RUN npm install --production ADD . /app ENV PORT 8081 EXPOSE 8081 These RUN apt-install is my added to default image. Ideally I think I should not do this way because it seem strange and some "unknown" drawback. But it seem most simple way in developer view. Aptible like many other Docker based service (AWS Beanstalk for example) allow custom image, but again it too adventurou

Một số kinh nghiệm phỏng vấn Web Developer - PHP

Diamond problem (ambiguous in inheritance) https://stackoverflow.com/questions/2064880/diamond-problem Class A, Class B some method here ... print A method, B method ... Question what output and why ? ... If we want class B method print A's method output ... => how to do that ? define final static self accept static method, properties. $this can not.... see more here :   https://www.wisdomjobs.com/e-university/object-oriented-programming-in-php-interview-questions.html SQL design Product, Orders, query best sell each month ... In PHP, Overloading is possible http://200-530.blogspot.in/2013/04/oop-magic-methods.html

Docker microservices p2

https://techbeacon.com/8-best-open-source-tools-building-microservice-apps http://blog.christianposta.com/microservices/low-risk-monolith-to-microservice-evolution/ https://laracasts.com/discuss/channels/general-discussion/is-there-microservice-example-in-php The question is a bit naive. A micro-service solution tends to exploit many technologies and many implementations of Lumen/other solutions. I work with micro-services and we must have 100+ repositories deployed on the AWS platform inside docker containers and Lambda functions and lots of SQS/SNS queues exploiting the "pub/sub" model. On a daily basis I am confronted with PHP, NodeJs and GoLang server side solutions. Take a peek at https://www.nginx.com/wp-content/uploads/2015/01/Building_Microservices_Nginx.pdf for starters. Good luck https://blog.shopsys.com/microservices-architecture-in-ecommerce-605299a8215e

Note AWS 3

Multiple profile user CLI Many time we want to use many user/credential with AWS CLI https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html And update ~/.aws/config https://stackoverflow.com/questions/29190202/how-to-change-the-aws-account-using-the-elastic-beanstalk-cli CodePipeline (CodeCommit or CodeBuild) https://medium.com/@xoor/using-aws-codepipeline-to-automate-deployments-to-elasticbeanstalk-e80ca988ef70 git-codecommit https://forums.aws.amazon.com/thread.jspa?threadID=198356 Two questions: 1) Does this command work: $ echo -e "protocol=https\npath=/v1/repos/myrepo\nhost=git-codecommit.us-east-1.amazonaws.com" | aws codecommit credential-helper get 2) If it does not work, could you provide debug logs by running: $ echo -e "protocol=https\npath=/v1/repos/myrepo\nhost=git-codecommit.us-east-1.amazonaws.com" | aws codecommit credential-helper get --debug It is more complicated than it seems. Here is AWS git config https:

WP tuning p2 (API), Lumen, Laravel codepipeline Beanstalk

https://deliciousbrains.com/comparing-wordpress-rest-api-performance-admin-ajax-php/ https://stackoverflow.com/questions/3338220/how-to-simulate-high-traffic-load-on-a-web-application http://www.opensourcetesting.org/category/performance/page/2/ https://jmeter.apache.org/usermanual/get-started.html#non_gui curl -sH 'X-Papertrail-Token: YOUR-HTTP-API-KEY' https://papertrailapp.com/api/v1/archives.json |   grep -o '"filename":"[^"]*"' | egrep -o '[0-9-]+' |   awk '$0 >= "YYYY-MM-DD" && $0 < "YYYY-MM-DD" {     print "output " $0 ".tsv.gz"     print "url https://papertrailapp.com/api/v1/archives/" $0 "/download"   }' | curl --progress-bar -fLH 'X-Papertrail-Token: YOUR-HTTP-API-KEY' -K- https://help.papertrailapp.com/kb/how-it-works/permanent-log-archives/#usage-example https://medium.com/@avishayil/deploy-to-elastic-beanstalk-using-bitbuc