Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/
$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf| <excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
| <excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
| <excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/_build/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
| <excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/deps/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> |
| import React from 'react' | |
| import axios, { post } from 'axios'; | |
| class SimpleReactFileUpload extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state ={ | |
| file:null | |
| } |
| import mongoose from 'mongoose'; | |
| import _ from 'lodash'; | |
| import dotize from 'dotize'; | |
| ApplicationSchema.methods.upsertRelease = function(query, object) { | |
| const application = this; | |
| // Create an object from query using dot notation instead of objects ('releases.github.id') | |
| const dotQuery = dotize.convert(query, 'releases'); | |
| // Create an object of values to update to, uses mongoose's $ operator |
This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).
$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
| Running shell scripts that have contain sudo commands in them from jenkins might not run as expected. To fix this, follow along | |
| Simple steps: | |
| 1. On ubuntu based systems, run " $ sudo visudo " | |
| 2. this will open /etc/sudoers file. | |
| 3. If your jenkins user is already in that file, then modify to look like this: | |
| jenkins ALL=(ALL) NOPASSWD: ALL | |
| 4. save the file by doing Ctrl+O (dont save in tmp file. save in /etc/sudoers, confirm overwrite) | |
| 5. Exit by doing Ctrl+X | |
| 6. Relaunch your jenkins job |
| #!/bin/bash | |
| # | |
| # Automate mysql secure installation for debian-baed systems | |
| # | |
| # - You can set a password for root accounts. | |
| # - You can remove root accounts that are accessible from outside the local host. | |
| # - You can remove anonymous-user accounts. | |
| # - You can remove the test database (which by default can be accessed by all users, even anonymous users), | |
| # and privileges that permit anyone to access databases with names that start with test_. |
| #!/bin/sh | |
| #check if i3lock is already running | |
| pgrep i3lock > /dev/null && exit 1 | |
| #make screenshot | |
| scrot ~/lockscreen.png | |
| #apply blur | |
| mogrify -filter Gaussian -resize 20% -define filter:sigma=1 -resize 500% ~/lockscreen.png | |
| #mogrify -blur 0x8 ~/lockscreen.png |