This file contains 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
function rcode() { | |
local target_path="$1" | |
VSCODE_SERVER_PATH="${HOME}/.vscode-server" | |
VSCODE_SERVER_BIN_PATH="${VSCODE_SERVER_PATH}/bin" | |
VSCODE_SERVER_BIN_CURRENT_PATH="${VSCODE_SERVER_BIN_PATH}/$(ls -t ${VSCODE_SERVER_BIN_PATH} | head -n 1)" | |
VSCODE_IPC_HOOK_CLI=$(ss -l |grep vscode-ipc |tail -n 1 | awk '{print $5}') | |
VSCODE_IPC_HOOK_CLI=$VSCODE_IPC_HOOK_CLI ${VSCODE_SERVER_BIN_CURRENT_PATH}/bin/remote-cli/code ${target_path} | |
} |
This file contains 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
#!/usr/bin/python | |
# MIT License | |
# Copyright (c) 2018 CK | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains 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
#!/usr/bin/env ansible-playbook | |
--- | |
- name: rpm_check | |
hosts: test_vm | |
tasks: | |
- name: copy the_silver_searcher rpm | |
copy: src=/opt/the_silver_searcher-0.33.0-1.el7.x86_64.rpm dest=/opt/the_silver_searcher-0.33.0-1.el7.x86_64.rpm | |
- name: Check if ag.rpm is installed | |
command: rpm -q the_silver_searcher |