Removes merged branches that are already deleted from the remote repository, but they are still on your local machine.
git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
Extracted from cytopia/devilbox#718 issue
export IP=$(hostname -I)
PROJECTS_PATH=~/code
dvb-create-host() { | |
# Vars | |
BASE_DIR="~/www/$1/htdocs" | |
DB_NAME="$1_db" | |
DB_HOST="mysql" | |
DB_USER="root" | |
DB_PASS="" | |
WP_URL="$1.local" | |
WP_USER="ilan" |
# .github/workflows/cron.yml | |
# You must add your YOUR_BUILD_HOOK from your repo > Settings > Secrets | |
name: Trigger Netlify Build | |
on: | |
schedule: | |
# Run at 0815 daily | |
- cron: '15 8 * * *' | |
jobs: | |
build: |
<?xml version="1.0"?> | |
<ruleset name="WordPress Theme Coding Standards" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> | |
<description>A custom set of rules to check for a WPized WordPress project</description> | |
<!-- General PHPCS config. --> | |
<file>.</file> | |
<arg value="sp"/> | |
<arg name="extensions" value="php"/> |
# Idea taken from https://gist.github.com/jackcarter/d86808449f0d95060a40 | |
import time | |
import codecs | |
import requests | |
reader = codecs.getreader("utf-8") | |
# Obtain your's by creating a Slack app on https://api.slack.com/apps?new_app=1 and assign that to your workspace. | |
# Within this new app, go to "OAuth & Permissions" and in the section "Scopes > User Token Scopes" add the "files:read" and "files:write" Oauth scopes. | |
# Finally, you can now go to the top of the page and install the app to the workspace. After that you'll get the User OAuth Token that you can use on the script. |
class BulmaModal { | |
constructor(modalButton) { | |
const target = modalButton.dataset.target; | |
if (target) { | |
this.button = modalButton; | |
this.modal = document.querySelector(target); | |
this.html = document.querySelector("html"); | |
this.openEvent(); |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^camunda\.test$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://camunda.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
dotenv () { | |
set -a | |
[ -f .env ] && . .env | |
set +a | |
} | |
dotenv |
# Create secure key | |
ssh-keygen -t rsa -b 4096 -C "key_identifier" | |
# Upload key to server | |
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] |