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/std@0.109.0/encoding/base64url.ts"; | |
import { join } from "https://deno.land/std@0.109.0/path/mod.ts"; | |
import fs from "https://deno.land/std@0.109.0/node/fs.ts"; | |
import git from "http://esm.sh/isomorphic-git@1.10.0"; | |
import http from "http://esm.sh/isomorphic-git@1.10.0/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
#!/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
#!/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
<?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
<?php | |
class Page_Object { | |
public $ID; | |
public $original_post; | |
public $data = array(); | |
public function __construct( $id ) { |
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
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 | |
class WCFAY_Plugin_Settings { | |
public function __construct() { | |
} | |
public function create_page() { | |
} | |
public function register_settings() { |
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> |
NewerOlder