Skip to content

Commit 0466adc

Browse files
committed
update: fast yaml creation code snippet
1 parent fea86d4 commit 0466adc

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

src/commands/setup/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const checkShellProfile = async (): Promise<boolean> => {
4040
return false;
4141
};
4242

43-
export const checkEnviromentSetup = async (): Promise<void> => {
43+
export const checkEnvironmentSetup = async (): Promise<void> => {
4444
logger.debug("Checking environment setup...");
4545
let isSetup = await checkShellProfile();
4646
if (isSetup) {
@@ -96,5 +96,5 @@ export const setupCommand: callback = async (args: any) => {
9696
vscode.window.showInformationMessage(
9797
"Weaponized setup completed successfully."
9898
);
99-
await checkEnviromentSetup();
99+
await checkEnvironmentSetup();
100100
};

src/snippets/source/weapon/weapon.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,61 @@
2626
"drop table if exists ${1:RESULT}; create table ${1:RESULT} (data text); copy ${1:RESULT} from program '${2:COMMAND}' ; select * from ${1:RESULT};${0}"
2727
],
2828
"description": "execute command on remote psql server"
29+
},
30+
"user credentials yaml creation": {
31+
"prefix": "```yaml credentials",
32+
"body": [
33+
"```yaml credentials",
34+
"- user: ${1:admin}",
35+
" password: ${2:password}",
36+
" nt_hash: ${2:5fbc3d5fec8206a30f4b6c473d68ae76}",
37+
" login: ${3:EXAMPLE}",
38+
" is_current: ${4:true}",
39+
" props: {}",
40+
"```"
41+
],
42+
"description": "user credentials"
43+
},
44+
"user credentials yaml append": {
45+
"prefix": "- user:",
46+
"body": [
47+
"- user: ${1:admin}",
48+
" password: ${2:password}",
49+
" nt_hash: ${2:5fbc3d5fec8206a30f4b6c473d68ae76}",
50+
" login: ${3:EXAMPLE}",
51+
" is_current: ${4:false}",
52+
" props: {}"
53+
],
54+
"description": "user credentials append"
55+
},
56+
"host yaml creation": {
57+
"prefix": "```yaml host",
58+
"body": [
59+
"```yaml host",
60+
"- hostname: ${1:example.com}",
61+
" ip: ${2:192.168.1.100}",
62+
" alias:",
63+
" - dc01.${1:example.com}",
64+
" is_dc: ${5:false}",
65+
" is_current: ${6:true}",
66+
" is_current_dc: ${7:false}",
67+
" props: {}",
68+
"```"
69+
],
70+
"description": "host information"
71+
},
72+
"host yaml append": {
73+
"prefix": "- hostname:",
74+
"body": [
75+
"- hostname: ${1:example.com}",
76+
" ip: ${2:192.168.1.100}",
77+
" alias:",
78+
" - dc01.${1:example.com}",
79+
" is_dc: ${5:false}",
80+
" is_current: ${6:false}",
81+
" is_current_dc: ${7:false}",
82+
" props: {}"
83+
],
84+
"description": "host information"
2985
}
3086
}

0 commit comments

Comments
 (0)