Skip to content

Instantly share code, notes, and snippets.

View haqHUB's full-sized avatar
👾
Remote DevOps

haqHUB haqHUB

👾
Remote DevOps
  • haqHUB
  • EU
View GitHub Profile
@haqHUB
haqHUB / clean-docker-for-mac.sh
Created April 3, 2017 18:17 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
@haqHUB
haqHUB / connect-wordpress-database-docker
Created April 3, 2017 19:51 — forked from raewrites/connect-wordpress-database-docker
Connect to WordPress Database Docker
version: ‘2’
services:
db:
image: mysql:5.7
volumes:
wp core download
wp core config --dbname=$1 --dbuser=root --dbpass=root --dbhost=localhost --extra-php <<PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
PHP
wp db create
wp core install --url=http://$1.com --title=$1 --admin_user=admin --admin_password=password --admin_email=admin@$1.com
@haqHUB
haqHUB / particles-background.markdown
Last active July 5, 2017 22:24 — forked from anonymous/index.html
Particles Background
@haqHUB
haqHUB / template.html
Created October 27, 2017 10:21 — forked from assafelovic/template.html
Dynamic email template in pure html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Automatic Email</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin:0; padding:10px 0 0 0;" bgcolor="#F8F8F8">
<table align="center" border="1" cellpadding="0" cellspacing="0" width="95%%">
@haqHUB
haqHUB / forminator-example.txt
Created October 10, 2018 21:35 — forked from feliciaceballos/forminator-example.txt
New Client Questionnaire
{"type":"form","data":{"fields":[{"id":"section-1","element_id":"section-1","form_id":"wrapper-1537827779502-1868","condition_action":"show","condition_rule":"any","conditions":[],"type":"section","options":[],"cols":12,"section_title":"Project Leader","section_border":"false","section_subtitle":"","custom-class":"","wrapper_id":"wrapper-1537827779502-1868"},{"id":"name-1","element_id":"name-1","form_id":"wrapper-1511347711918-1669","condition_action":"show","condition_rule":"any","conditions":[],"type":"name","cols":4,"required":"true","field_label":"Project Leader Name","placeholder":"E.g. John","prefix_label":"Prefix","fname_label":"First Name","fname_placeholder":"E.g. John","mname_label":"Middle Name","mname_placeholder":"E.g. Smith","lname_label":"Last Name","lname_placeholder":"E.g. Doe","prefix_description":"","fname_description":"","mname_description":"","lname_description":"","description":"","custom-class":"","wrapper_id":"wrapper-1511347711918-1669"},{"id":"email-1","element_id":"email-1","form_id
@haqHUB
haqHUB / restart_bluetooth.sh
Created January 22, 2019 13:25 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@haqHUB
haqHUB / WordPress Development .gitignore
Created April 17, 2019 20:05 — forked from ixrevo/WordPress Development .gitignore
.gitignore file for setting up the WordPress development environment.
########################
# Wordpress Core files #
########################
wp-admin/
wp-content/backups/
wp-content/blogs.dir/
wp-content/languages/
wp-content/index.php
wp-content/themes/index.php
wp-includes/