技术
-
Mac command line cheat sheet
Behavior Command Comment go to the beginning of the line ctrl+a go to the end of the line ctrl+e Save a output of a command to a env variable principle_arn=$(aws –profile perAdmin sts get-caller-identity –query Arn –output text) use a env variable ${principle_arn} replace character sed -e “s|PRINCIPAL_ARN|${principle_arn}|g” \assume-role-policy-template.json > assume-role-policy.json The delimiter of choice is a forward slash (/), which is the most commonly used delimiter. However, sed can use any character as a delimiter. In fact, it will automatically use the character following the s as a delimiter-e means you can use the followed scripts multiple times.https://unix.stackexchange.com/questions/33157/what-is-the-purpose-of-e-in-sed-command
-
Kibana Query cheatsheet
Example Query Result DSL message:”a test” 1 match phase message: a test 1, 2 match message.keyword: “a test” none match phase message.keyword: “this is a test” 2 match phase KQL got converted to DSL before sending to the server: We can check the related DSL by clicking “inspect” button in UI. Reference: https://xeraa.net/blog/2021_kibana-map-kql-url-elasticsearch-query/
-
My first receipt to myself
I payed myself $1 to myself. 😀
-
SSH related cheet sheet
Ignore password when ssh to a host ssh-copy-id Ignore pass phrase:
-
Useful network cheat sheet
Check SSL openssl s_client -connect poynt.frontdoor.akadns.net:443 -showcerts Routing path: poynt.net (A) => dwccpvpm8ni1x.cloudfront.net (Poynt AWS) => poynt.frontdoor.akadns.net (CNAME) => poynt.us-east-1.fd.aws.gdcld.net (Envoy Proxy) => ALB => web
-
Sublime Column Mode
It’s very easy and the easiest way is just hold the middle mouse button and move the mouse. If you want to select specific lines. While you have selected the lines, loose the middle mouse button and hold “CMD” button and re-select new lines. If you want to subtract from selection, hold “CMD” and “Shift” instead. Alternative is hold “ctrl” and “shift” button and keep clicking “up” or “down” to select. Reference: https://www.sublimetext.com/docs/2/column_selection.html
-
How to build company culture?
Managers and leaders play an important role to build up company culture. The culture may start with senior leadership team but every employee should be able to feel the culture. As a manager, what exactly we can do to build culture? Long term benefit over short term gain. As a manager, you need to make sure the code quality is good to be easily maintained and be able to scale for long term growth. Other than rush to delivery one feature. Everything should be able to be themselves. Create a flexible and open environment. Everybody is different, people may or may not want to show their face during Zoom call.…
-
What keep people stay in company for more than 5 years? (How to retain talent?)
One of the top factors keeping professionals at their company is having a strong workspace benefits; it’s around 44%. Nothing fancy here and we should respect the simple truth that people work because they need to live a better life. Benefits including those common stuff: PTO, parental leave and health insurance. More importantly, intangible areas that matters to employees are: work-life balance and flexibility (51%) foster a culture where they can be themselves (47%) Have a positive impact on society (46%) Perks like free food and game rooms are good but the research shows this is actually one of the least enticing factors for keeping people at their current company…
-
Must Known Linux Command as a developer
-
Softlink for Docker volume
Try not to use it, as simple as that.. https://stackoverflow.com/questions/38485607/mount-host-directory-with-a-symbolic-link-inside-in-docker-container