Skip to content

Instantly share code, notes, and snippets.

View SergiuCip's full-sized avatar
🙂

Sergiu SergiuCip

🙂
  • UK
View GitHub Profile
@gagarine
gagarine / install-clamav-osx.md
Last active March 25, 2025 18:08
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

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
@coreyti
coreyti / _render
Last active September 11, 2020 18:24
Command to render ERB+YAML
#!/usr/bin/env ruby
require 'optparse'
require 'ostruct'
require 'erb'
require 'json'
require 'yaml'
module GCP
class Context
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git