-
Setup VS Code
git clone git@github.com:HansKre/markdown-execute.git cd markdown-execute npm install code .
-
Then, inside the editor, click
Run > Start Debugging
or pressF5
. This will compile and run the extension in a new Extension Development Host window. -
Inside of your first editor window, you will have a
watch
-task running. This task will compile the extension and run it in the background. In the new Extension Development Host window you can open anymarkdown
file and execute commands on the terminal through themarkdown-execute
-extension.
Official how-to publish extensions to VS Code Extension Marketplace here.
Visual Studio Code uses Azure DevOps for its Marketplace services.
Publishing happens using vsce
, the CLI tool for managing VS Code extensions.
-
Create an Azure DevOps account
-
Create a publisher
-
Install
vsce
-CLInpm install -g @vscode/vsce
-
Login
vsce
with your publishervsce login <publisher name> # provide your personal access token # login at https://dev.azure.com if your current token expired to create a new one
You can auto-increment an extension's version number when you publish by specifying the SemVer compatible number to increment: major
, minor
, or patch
: vsce publish major
This will modify the extension's package.json
version attribute before publishing the extension.
You can also specify a complete SemVer compatible version on the command line: vsce publish 2.0.1
If vsce publish is run in a git repo, it will also create a version commit and tag via npm-version. The default commit message will be extension's version, but you can supply a custom commit message using the -m
flag. (The current version can be referenced from the commit message with %s
.)
# first: update release notes by referencing the next version
# commit all changes
# from extension root
# no ned to package by running: vsce package
# this would generate <extenstion-name>.vsix with old version number
vsce publish patch
# this bumps the version number, creates git tag and commit
# after that, it publishes to VS Code Marketplace as <publisherID>.<extension-name>
VSCode will display commands in Shortcuts-menu, even if they are not registered in the package.json
. Hence, they will lack a description / title. So it could be better to provide it proactively.
"contributes": {
"commands": [
{
"command": "markdown-execute.sayHello",
// this title is shown in the VS Code command palette
// and also in Shortcuts menu
"title": "Hello from Markdown Execute"
}
],
...
}
Whenever a command, e.g. markdown-execute.sayHello
is being invoked, this activation event is emitted and interested other extensions will be activated (pub-sub pattern):
"activationEvents": [
"onCommand:markdown-execute.sayHello"
]
- Quicktime on mac, export to 480p
- Use ezgif to speedup 3x and convert to gif
export jenkins=ec2-3-122-205-211.eu-central-1.compute.amazonaws.com
ssh -i ./udemy-devops-project/follow/secrets/aws-jenkins.pem ec2-user@$jenkins
ip4=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
for i in {1..3}
do
echo "Foo $ip4 $i"
done
exit
-
Export public ip of instance
export jenkins=ec2-3-122-205-211.eu-central-1.compute.amazonaws.com echo $jenkins
-
Special chars
let i = 12; console.log('ab$cd'); console.log('ab$$cd'); console.log('sdfdsgdfg'); console.log(`ab${i}cd`); console.log(`three spaces in a row`);
Expected output:
node -e "let i = 12; dquote> console.log('ab\$cd'); dquote> console.log('ab\$\$cd'); dquote> console.log('sdfdsgdfg'); dquote> console.log(\`ab\${i}cd\`); dquote> " ab$cd ab$$cd sdfdsgdfg ab12cd three spaces in a row
-
Test Python
print("it works")
-
SSH into machine
ssh -i ./udemy-devops-project/follow/secrets/aws-jenkins.pem ec2-user@$jenkins
-
Become root
sudo su -
-
Change hostname & reboot
# either hostnamectl set-hostname jenkins # or: echo "jenkins" > /etc/hostname # confirm cat /etc/hostname # reboot reboot
-
SSH back into machine
# wait for reboot sleep 30 ssh -i ./udemy-devops-project/follow/secrets/aws-jenkins.pem ec2-user@$jenkins sudo su -
-
Update OS
yum update -y && yum upgrade -y
-
Install Jenkins and Java 11:
# add redhat-jenkins-repo
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
# add jenkins package public key
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
# install repository that provides 'daemonize'
amazon-linux-extras install epel -y
# install jdk
amazon-linux-extras install java-openjdk11 -y
# test jdk installation
java --version
# install jenkins
yum install jenkins -y
- Press
F5
to start a new VSCode-Instance for debugging - Create some terminal-instances (e.g. create one by sending new execution to it)
- Close the debugging-instance
- Repeat with #1
- Debugging out goes to the "DEBUG CONSOLE" of the parent-VSCode-Instance