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
definitions: | |
caches: | |
composer: vendor/ | |
node: frontend/node_modules | |
steps: | |
- step: &composer | |
name: "Install project via composer" | |
image: composer:2 | |
caches: | |
- composer |
# To enable CORS you should add lines with CORS rules below to your valet.conf file | |
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx | |
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory | |
# after you edit your valet.conf do not forget to execute `valet restart` | |
server { | |
listen 80 default_server; | |
root /; | |
charset utf-8; | |
client_max_body_size 128M; |
<?php | |
/** | |
* @link | |
* @since 1.0.0 | |
* @package TODO | |
* | |
* @wordpress-plugin | |
* Plugin Name: Use MailHog | |
* Description: Configure WordPress on Valet to use MailHog | |
* Version: 1.0.0 |
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install composer | |
brew install homebrew/php/composer | |
### PHPCS | |
composer global require "squizlabs/php_codesniffer=*" | |
# Add to your .bash_profile |
export default class Ajax { | |
get(url, callback) { | |
let xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); | |
xhr.open('GET', url); | |
xhr.onreadystatechange = () => { | |
if (xhr.readyState > 3 && xhr.status === 200) { | |
callback(xhr.responseText); | |
} | |
}; | |
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); |
# Capistrano Task that hooks into `deploy:finished` to send a message to Slack | |
# | |
# 1. Setup a Slack Incoming Webhook Integration (https://api.slack.com/incoming-webhooks) | |
# 2. Put the Webhook URL in an Environment variable (SLACK_WEBHOOK_URL) | |
# 3. Place this file in `lib/capistrano/tasks` | |
# | |
# This will then create a new message in the channel on deployment, including who, what and where information | |
require "net/http" | |
require "json" |
function tip(){ | |
host -t a $1 | awk '{print $4}' | egrep ^[1-9] | pbcopy | |
} |
syntax "gitcommit" "COMMIT_EDITMSG$" | |
color white "#.*" | |
color green "#.(modified|deleted).*" | |
color yellow start="# Changes.*" end="# Changed.*" | |
color cyan start="# Untracked.*" end="diff" | |
color cyan start="# Untracked.*" end="$$" | |
color brightred "^deleted file mode .*" | |
color brightgreen "^\+.*" | |
color brightred "^-.*" | |
color brightyellow "^(diff|index|---|\+\+\+).*" |