This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm -rf "$HOME/.vscode" | |
| rm -rf "$HOME/.config/Code" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm -r "$env:APPDATA\Code" | |
| rm -r "$env:USERPROFILE\.vscode" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rm -rf "$HOME/.vscode" | |
| rm -rf "$HOME/Library/Application Support/Code" | |
| rm -rf "$HOME/Library/Caches/com.microsoft.VSCode" | |
| rm -rf "$HOME/Library/Saved Application State/com.microsoft.VSCode.savedState" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.1' | |
| services: | |
| mysql: | |
| image: mysql:latest | |
| container_name: mysql | |
| # this is the maigc for login | |
| command: --default-authentication-plugin=mysql_native_password | |
| restart: always | |
| environment: | |
| MYSQL_DATABASE: 'db' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package service | |
| import ( | |
| "testing" | |
| "github.com/proclaim/mock-slack-api/server" | |
| "github.com/slack-go/slack" | |
| "github.com/stretchr/testify/assert" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package service | |
| import ( | |
| "github.com/slack-go/slack" | |
| ) | |
| func (s *SlackService) PostMessage(channel string, attachment slack.Attachment) (string, string, error) { | |
| // ... your implementation here | |
| return s.api.PostMessage( | |
| channel, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package server | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "net/http/httptest" | |
| "net/url" | |
| "strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // assume entityIds is an array | |
| connection.createQueryBuilder() | |
| .delete() | |
| .from(entity) | |
| .where('entity.id IN (:...ids)', { ids: entityIds }) | |
| .execute() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| num=1 | |
| find . -mindepth 2 -type f -print | while read x; do | |
| y=$(basename "$x") | |
| if [ -f "$y" ]; then | |
| mv "$y" "$num"."$y" | |
| num=$(( $num + 1 )) | |
| fi | |
| mv "$x" "$y" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: localhost | |
| connection: local | |
| gather_facts: false | |
| tasks: | |
| - name: Create Lambda function | |
| lambda: | |
| name: hello-Taiwan | |
| region: us-east-1 | |
| zip_file: "main.zip" |
NewerOlder