- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
<?php | |
namespace DeliciousBrains\Admin; | |
use DeliciousBrains\DBI; | |
class ACF { | |
public function init() { | |
add_filter( 'acf/settings/save_json', array( $this, 'get_local_json_path' ) ); |
<?php | |
namespace DeliciousBrains\Admin; | |
use DeliciousBrains\DBI; | |
class ACF { | |
public function init() { | |
add_filter( 'acf/settings/save_json', array( $this, 'get_local_json_path' ) ); |
Example: You have a branch refactor
that is quite different from master
. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.
On master:
> git co -b temp
add_action( 'phpmailer_init', 'fix_my_email_return_path' ); | |
function fix_my_email_return_path( $phpmailer ) { | |
$phpmailer->Sender = $phpmailer->From; | |
} |
#!/bin/bash | |
function deploy { | |
# Update the rsync target on the server | |
rsync \ | |
-av \ | |
--delete \ | |
--delete-excluded \ | |
$rsync_ignore_list_param \ | |
$rsync_source/ $target:$rsync_target |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'
Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8-alpine |