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| # add this to your .bashrc or .aliases or .zshrc | |
| ship() { | |
| if [ $# -eq 0 ]; then | |
| message="improvement" # Default commit message | |
| else | |
| message="$*" # Combine all arguments into a single commit message | |
| fi | |
| git commit -am"$message" # Commit changes |
| function buildCreate2Address(senderAddress, saltHex, bytecode) { | |
| return web3.utils.toChecksumAddress(`0x${web3.utils.sha3(`0x${[ | |
| 'ff', | |
| senderAddress, | |
| saltHex, | |
| web3.utils.sha3(bytecode) | |
| ].map(x => x.replace(/0x/, '')) | |
| .join('')}`).slice(-40)}`); | |
| } |
| #created by @nthgergo | |
| set :application, "APPLICATION_NAME" | |
| set :scm, :git | |
| set :repository, "GIT_URL" | |
| set :user, "ec2-user" | |
| set :ssh_options, { :forward_agent => true } | |
| default_run_options[:pty] = true | |
| set :use_sudo, false | |
| set :branch, "master" |
| Tricks to add encrypted private SSH key to .travis.yml file | |
| To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21 | |
| base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64 | |
| ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)" | |
| split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ | |
| #!/bin/bash | |
| # herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
| # rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
| # compress the data files, create a restore script, and push it all up to S3. | |
| TODAY=`date +"%Y.%m.%d"` | |
| INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
| INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
| BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
| BACKUPDIR="/mnt/es-backups/" | |
| YEARMONTH=`date +"%Y-%m"` |
| namespace :jshint do | |
| task :require do | |
| sh "which jshint" do |ok, res| | |
| fail 'Cannot find jshint on $PATH' unless ok | |
| end | |
| end | |
| task :check => 'jshint:require' do | |
| project_root = File.expand_path('../../', File.dirname(__FILE__)) | |
| config_file = File.join(project_root, 'config', 'jshint.json') |
| function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |