Skip to main content

Posts

Notes on product variants database design and some about ngrok

https://magento.stackexchange.com/questions/10338/stock-control-race-condition-between-checkout-and-payment-completion https://essay.utwente.nl/78020/1/Emous_van_MA_EEMCS.pdf https://github.com/inconshreveable/ngrok/issues/579 https://stackoverflow.com/questions/31632534/targeting-dev-sites-with-vhost-setup-using-ngrok https://stackoverflow.blog/2019/07/18/building-community-inclusivity-stack-overflow/ ngrok Open http://localhost:4040 https://stackoverflow.com/questions/24923469/modeling-product-variants You could have a design like: More detail... https://stackoverflow.com/questions/8077978/mysql-queries-extremely-slow-in-fresh-xampp-installation Get background ngrok URL  https://stackoverflow.com/questions/34322988/view-random-ngrok-url-when-run-in-background I know that localhost:4040 work but forgot how to get URL on bash since on Server no GUI browser. W3m or lynx do not work with JS. https://martinfowler.com/books/refactoringDatabases.html https://www.red-gate.com/simple-talk...

Note on Jenkins and AWS CI/CD

https://unix.stackexchange.com/questions/401068/web-browser-from-console-centos https://devops.stackexchange.com/questions/6863/what-is-better-between-jenkins-aws-codedeploy-for-ci-cd https://linuxize.com/post/how-to-install-jenkins-on-centos-7/ https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-8 https://forums.aws.amazon.com/thread.jspa?threadID=83249 cat /etc/issue cat /etc/system-release https://github.com/vicenteguerra/git-deploy http://lessgeneric.com/server/deploy-bitbucket-webhook-phpbash/ https://support.atlassian.com/bitbucket-cloud/docs/create-and-trigger-a-webhook-tutorial/ ~/Downloads/ngrok http -host-header=rewrite concepts.local:80 https://searchaws.techtarget.com/tip/Compare-AWS-CodePipeline-vs-Jenkins-for-CI-CD sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key https://stackoverflow.com/questions/61344317/im-getting-error-public-key-for-jenkins-2-232-1-1-noarch-rpm-is-not-installed Add apache to Git pu...

Notes on complex business “illogic” that makes business software so difficult

Even if a company unifies the technology for integration, they run into problems with differences in business process and conceptual dissonance with the data. One division of the company may think a customer is someone with whom it has a current agreement; another division also counts those that had a contract but don’t any longer; another counts product sales but not service sales. That may sound easy to sort out, but when you have hundreds of records in which every field can have a subtly different meaning, the sheer size of the problem becomes a challenge—even if the only person who knows what the field really means is still with the company. (And, of course, all of this changes without warning.) As a result, data has to be constantly read, munged, and written in all sorts of different syntactic and semantic formats. Then there’s the matter of what comes under the term “business logic.” I find this a curious term because there are few things that are less logical than business logic...

Shell Bash get datetime and format

https://stackoverflow.com/questions/1401482/yyyy-mm-dd-format-date-in-shell-script In bash (>=4.2) it is preferable to use printf's built-in date formatter (part of bash) rather than the external date (usually GNU date). As such: # put current date as yyyy-mm-dd in $date # -1 -> explicit current date, bash >=4.3 defaults to current time if not provided # -2 -> start time for shell printf -v date '%(%Y-%m-%d)T\n' -1  # put current date as yyyy-mm-dd HH:MM:SS in $date printf -v date '%(%Y-%m-%d %H:%M:%S)T\n' -1  # to print directly remove -v flag, as such: printf '%(%Y-%m-%d)T\n' -1 # -> current date printed to terminal In bash (<4.2): # put current date as yyyy-mm-dd in $date date=$(date '+%Y-%m-%d') # put current date as yyyy-mm-dd HH:MM:SS in $date date=$(date '+%Y-%m-%d %H:%M:%S') # print current date directly echo $(date '+%Y-%m-%d') Other available date formats can be viewed from the date man pages (for external ...

echo "not enough Space" >&2

https://stackoverflow.com/questions/23489934/echo-2-some-text-what-does-it-mean-in-shell-scripting To quickly explain what the others missed: echo "hey" >&2 > redirect standard output (implicit 1> ) & what comes next is a file descriptor, not a file (only for right hand side of >) 2 stderr file descriptor number Redirect stdout from echo command to stderr. (If you were to useecho "hey" >2 you would output hey to a file called 2) https://stackoverflow.com/questions/41127585/shell-how-to-check-available-space-and-exit-if-not-enough #!/bin/bash # Note: Numbers are 1024-byte units on Linux, #       and 512-byte units on macOS. reqSpace=100000000 availSpace=$(df "$HOME" | awk 'NR==2 { print $4 }') if (( availSpace < reqSpace )); then   echo "not enough Space" >&2   exit 1 fi

AWS S3 Glacier

https://docs.aws.amazon.com/cli/latest/userguide/cli-services-glacier.html => Using aws glacier CLI (vs aws s3). This is different with aws s3 with --storage-class GLACIER. See  https://www.reddit.com/r/aws/comments/7y9z7f/whats_the_difference_between_s3_glacier_storage/ What's the difference between S3 Glacier storage class, and the Glacier vaults? I'm confused about the difference between: storing data in an S3 bucket, marked as storage class "GLACIER" creating a Glacier vault in the AWS console and using that instead https://stackoverflow.com/questions/62121247/aws-s3-glacier-upload-archive-taking-a-long-time-to-finish-execution-ways-to-c https://ystatit.medium.com/what-is-aws-s3-glacierstagingstorage-cost-a0c0be216589 https://stackoverflow.com/questions/44912550/multipart-upload-to-amazon-glacier-content-range-incompatible-with-content-leng https://stackoverflow.com/questions/46111372/change-s3-bucket-storage-class-to-s3-infrequent-access https://docs.aws.amazo...