Blog
Message APP Integration

[Slack][App] Building a Slash Command Slack App

Here, I’d like to record how to build a Slash Command Slack App – slashcode. App – https://slack.com/apps/A6SMGELHL  GitHub – https://github.com/dozstyle/slack_slashcommand This App provides three commands as below: /code: /code command will auto detect the language of your code snippet /codetype: you can specify the language of your code snippet via …

Read More
Linux Command & Tools

[Linux Commands] How to listen a port via command line to handle http request

NC $ while true; do echo 'HTTP/1.1 200 OK' | nc -l 8080; sleep 0.5; done GET / HTTP/1.1 User-Agent: curl/7.33.0 Host: localhost:8080 Accept: */* $ curl http://localhost:8080 -v * Rebuilt URL to: http://localhost:8080/ * About to connect() to localhost port 8080 (#0) * Trying 127.0.0.1… * Adding handle: conn: …

Read More
Composer

[PHP] Composer Usage

Installation https://getcomposer.org/doc/01-basic-usage.md $ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" $ php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" $ php composer-setup.php $ php -r "unlink('composer-setup.php');" After you done the above steps, you will see “composer.phar” was put on your …

Read More
GIt

[GitHub] basic commands

Git provides autocomplete .rc file that can help us more convenient to use git command. So, if you are using bash, please set this .rc up. .gitconfig Before you start using git, please edit your .gitconfig file first. [user] name = Lego Chen email = chenlego@gmail.com [color] ui = true [core] …

Read More
Lilicoco

[Chrome Extension][Postman] How to capture your http/https request urls

Today, I found a tool “Interceptor extension” that powered by Postman, it is able to capture all http/https URL requests that were executed by Chrome Browser. This tool is very useful to me to track how the GET fields and corresponding value of each field, when I submitted a form or …

Read More
Message APP Integration
1

[Slack][API] How to well done the URL verification of Event API

Before to listen Events from Slack, you have to complete Event URL verification. ( please see url_verification ) When you click Even Subscriptions link of your Slack APP, you would see the page as below diagram. https://api.slack.com/apps https://api.slack.com/apps/{Your APP ID}/event-subscriptions . As the diagram, it said they will send HTTP POST …

Read More
Message APP Integration

[Slack][API Server] How to well configure SSL Certificate on your API Server

Slack will validate SSL Certificate of your API Server. ( you can use SSL Lab to get your SSL report ) If you didn’t configure it well (ex: forgot to configure CA file in your SSL settings), you will get below error message. Darn – that slash command didn’t work …

Read More
Slack

[WordPress][Plugin] Integrated with Slack Notification

Plugin – https://wordpress.org/plugins/slack/ This plugin is using Slack Incoming WebHooks to send data to Slack in real time. Here is the link to do Incoming WebHooks integration. you may get your team’s Webhook URL there. You could use curl command to send message to your slack team’s channel via Webhook URL. Example: …

Read More
Frontend - HTML/CSS/JS

[WordPress][Customize] How to Use Animated GIF as WordPress Featured Images

Description Today, I learned some CSS transition feature as below and I recorded it as an animated GIF. WAVE Once done, I’d like to set this animated GIF as WordPress featured image, but it didn’t work, it became a static image. After I read this article , then know that’s why. …

Read More
Linux Command & Tools

[Linux][Commands] Compression Tools

tar tar is the most common compression tool in Unix-like system. Here, I list some common options and usage that used in my routine work. Options: -c: create tar archive -C: specify the directory to extract tar archive -v: verbose -j: filter the archive through bzip2  ( tar.bz or tbz ) -J: filter …

Read More