This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { encode } from "https://deno.land/[email protected]/encoding/base64url.ts"; | |
import { join } from "https://deno.land/[email protected]/path/mod.ts"; | |
import fs from "https://deno.land/[email protected]/node/fs.ts"; | |
import git from "http://esm.sh/[email protected]"; | |
import http from "http://esm.sh/[email protected]/http/web"; | |
import { QueryHandler } from "./QueryHandler.ts"; | |
const throwFSError = (e: Error) => { | |
if (e instanceof Deno.errors.AlreadyExists) { | |
throw { ...e, code: "EEXIST" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Multi_Singleton_Factory extends Singleton_Factory { | |
public static function get_singleton_key( $class, $args ) { | |
// Create a unique key based on instance-specific information (i.e. classname + args) | |
return md5( $class . '_' . serialize( $args ) ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd wordpress-site | |
cat >> docker-compose.yml <<EOL | |
my-wpcli: | |
image: tatemz/wp-cli | |
volumes_from: | |
- my-wp | |
links: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
version: "2" | |
services: | |
my-wpdb: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorld { | |
public static void main(String[] args) { | |
System.out.println("Hello, World"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// W3 Total Cache Integration with Beaver Builder | |
add_filter( 'fl_builder_render_css', __NAMESPACE__ . '\bb_plugin_cdn_url' ); | |
function bb_plugin_cdn_url( $css ) { | |
// Based on wp-content/plugins/w3-total-cache/extensions/WordPressSEO.php | |
if ( class_exists( 'W3_Plugin_CdnCommon' ) ) { | |
$site_url = wp_upload_dir(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( file_exists( dirname( __FILE__ ) . '/cmb2/init.php' ) ) { | |
require_once dirname( __FILE__ ) . '/cmb2/init.php'; | |
} elseif ( file_exists( dirname( __FILE__ ) . '/CMB2/init.php' ) ) { | |
require_once dirname( __FILE__ ) . '/CMB2/init.php'; | |
} | |
add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' ); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /app/code/local/MyCompany/MyModule/etc/config.xml --> | |
<?xml version="1.0"?> | |
<config> | |
<adminhtml> | |
<layout> | |
<updates> | |
<mycompany_mymodule> | |
<file>mycompany/mytemplate.xml</file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* AUTOCOMPLETE */ | |
.autocomplete{ | |
width: 100%; | |
position: relative; | |
} | |
.autocomplete input{ | |
font-size: 1.2em; | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( empty( $_POST['acf'] ) ) { | |
return; | |
} | |
if ( | |
!isset( $_POST['acf']['field_543aee78c4176'] ) | |
|| !isset( $_POST['acf']['field_543aee84c4177'] ) ) | |
{ | |
return; |
NewerOlder