Leverice commands list - message

I've been using Leverice and know /archive works in the message text box when using it as a command line (to archive the current active channel), but am looking for a digest of other commands I can use in the command line. Does anyone have a list handy?

Here's what I have so far on Unix-like commands that can be entered into the message text box in Leverice (and these are case-sensitive):
/archive ----- archive current active channel
/retrieveProject ------ reload workspace and clear cache
/unsubscribe ----- unsubscribe from current active channel
/mute ----- mute current active channel and its child channels
/unmute ----- unmute current active channel and its child channels
/renameUser -f FirstName -l LastName ----- this will change the name on your user profile
/cd /a/b/c ----- go to specific channel in a branch
/cd .. ----- go to parent channel of current active channel
/cd ../NameOfChannel ----- go to specific channel by name of the channel

Related

How to get only the Full name of previous Jenkins build

I would like to send the full name of the previous build that was received by using the following:
Run previousBuild = steps.currentBuild.rawBuild.getPreviousBuildInProgress()
in order to send to getItemByFullName as you can see below,
Jenkins.instance.getItemByFullName(previousBuildPath)
I tried to find it in the Run class hudson Documentation with no success.
while printing previousBuild I got the name with the build number like:
previousBuild- > project_neme/build_name #100
But I want to get only the name with no String substring cutting.
You are looking for display name property. Display name is the name given to each build (if you update it during execution) followed by a build number. The display name will only return the build name.
Jenkins.instance.getItemByFullName('JobName').getLastBuild().displayName
Read here
https://javadoc.jenkins.io/hudson/model/Job.html

Customise slack message with if block in Jenkins

I have a requirement to send out a slack message via jenkins post build step based on certain condition. I have put the below code snippet under "Custom Message" of Slack Notification of my jenkins build. Below prints the entire content of get_schedule_response.txt.
Here's the result for the schedule execution --------> ${FILE,path="$WORKSPACE/get_schedule_response.txt"}
I want to send out this slack notification only if the get_schedule_response.txt file content contains text SUCCESS in it. Is it possible to do?
by using grep command u can find out the word SUCESSS in the file get_schedule_response.txt file
if [(grep -o "SUCCESS" "$WORKSPACE/get_schedule_response.txt"}) = "SUCCESS"];
then
#include your slack notification for success
else
#include your slack notification for success
# -o : Print only the matched parts of a matching line,
to refer all options for grep command follow this link
https://www.geeksforgeeks.org/grep-command-in-unixlinux/

Problem with saving the product PrestaShop 1.7.6.7 + multistore

When saving the product (more precisely, changing the number of main items or in combination) with the multistore option enabled (only in the context of all stores), an error appears. Interestingly, after the second or next (how many stores in multi, how many times you have to click) the record goes correctly.
Recreation:
Go to BO >> set the shop context to >> "all shops"
go to the PRODUCTS tab >> edit the selected product >> change the STOCK (QUANTITY) to another >> click SAVE
I get a red message "Unable to update settings." and there is a problem with writing.
I get an error in JS console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error).
There is no error in the NETWORK tab, despite the debugging mode enabled in Presta.
Screenshots:
https://prnt.sc/uj2uf2
https://prnt.sc/uj2ul7
https://prnt.sc/uj2v5f
https://prnt.sc/uj2w5v (headers)
https://prnt.sc/uj2w13 (preview)
https://prnt.sc/uj2vr8 (initiator)
https://prnt.sc/uj2vuk (response)
Data for the demo version:
This is the original, freshly installed version.
Only the multistore has been enabled and one demo store has been added. That's all.
BO: http://bielizniana.pl/__test/admin758a9z7cn/
Login: test#test.pl
Password: test#test.pl
You have set your multistore option "Share available quantities to sell" to NO.
This means when you are editing the product in All shops context it does not know what to do with your quantities.

How to add Job in Customer table with qodbc insert statement

I am trying to add a job to the QuickBooks Customer table using the following sql statement. The customer table has several CustomFields (columns). When I apply the statement without the customField/column the statment works. When I run the sql line with the customField/column - I get an error and the row IS inserted without the customField/column data
INSERT INTO Customer (Name, ParentRefFullName, Companyname, Billaddressaddr1, CustomFieldAddNumber) VALUES ('.10~Root Name 01', '.00~Root Name 01', 'Zen Enterprise', 'my Address one', '.10' )
Error: only with 'CustomFieldAddNumber' set to '.10'
What is the correct way to add a Job to Customer table with CustomFeilds/Columns ?
Thanks
I would suggest you download & install QODBC latest version 320 from below link & test again:
http://www.qodbc.com/qodbcDownload.htm
If you are still facing the issue, I kindly request you to please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, I kindly request you to attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages

OSSEC Slack Integration

I want all OSSEC notifications to be routed to a Slack room instead of email. 2.9.Beta5 has a ossec-slack.sh active response script. The relevant parts of my ossec.conf are:
<command>
<name>ossec-slack</name>
<executable>ossec-slack.sh</executable>
<expect>srcip</expect>
<timeout_allowed>no</timeout_allowed>
</command>
<active-response>
<command>ossec-slack</command>
<location>local</location>
<level>1</level>
</active-response>
This works for SSH logins (failed and successful), but as far as I can tell doesn't trigger anything else. What am I doing wrong/how are others doing this? Is this just beta software being beta software?
First make sure your ossec-slack.sh file has the correct information in the top:
# FILE: /var/ossec/active-response/bin/ossec-slack.sh
SLACKUSER="ossec"
CHANNEL="#slack_chanel" # include the hash "#"
SITE="https://hooks.slack.com/services/TOKEN"
SOURCE="ossec2slack"
Your "SLACKUSER" is the same as the "Customize Name" field that you set in your Slack WebHook Integrations page.
Now that your ossec-slack.sh file is set up you can test your Slack integration manually:
/var/ossec/active-response/bin/ossec-slack.sh
Running the script manually will post recent entries from your alerts log file:
/var/ossec/logs/alerts/alerts.log
When this script is triggered as an active-response, it will only post the information for the current alert, rather than posting from your log file.
When you have verified that you can post Slack messages manually, add the following XML blocks to your ossec.conf file:
<!-- FILE: /var/ossec/etc/ossec.conf -->
<ossec_config>
<command>
<name>ossec-slack</name>
<executable>ossec-slack.sh</executable>
<expect></expect> <!-- no expect args required -->
<timeout_allowed>no</timeout_allowed>
</command>
<active-response>
<command>ossec-slack</command>
<location>local</location>
<level>3</level>
</active-response>
</ossec_config>
The settings above will post to your Slack channel whenever a level 3 or above alert is triggered.
Note: no arguments are required within the <expect> tag. But the <expect> tag itself, is required. See OSSEC's active-response documentation for more information.
To test this integration, restart your ossec server:
/var/ossec/bin/ossec-control restart
You should see the "OSSEC Started" alert very quickly:
If you do not see the alert, check your logs for any misconfigurations:
tail /var/ossec/etc/logs/ossec.log
tail /var/ossec/logs/active-responses.log
Not a full answer, but adding on here. To ensure this works, make sure you don't have this set in /var/ossec/etc/ossec.conf. If it's there, just remove.
<active-response>
<disabled>yes</disabled>
</active-response>

Resources