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
var admin = require("firebase-admin"); | |
const firebase = require("firebase"); | |
var serviceAccount = require("./showzone-firebase-service-account.json"); | |
// Initialize Firebase connection | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: "https://showzone-cloud.firebaseio.com", | |
}); |
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 scrapy | |
from scrapy.http import FormRequest | |
from datetime import datetime | |
class TSNSpider(scrapy.Spider): | |
startTime = datetime.now() | |
name = 'tsnspider' | |
custom_settings = { | |
'CONCURRENT_REQUESTS': 100, | |
'CONCURRENT_REQUESTS_PER_DOMAIN': 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
// Imports the Google Cloud client library | |
const Compute = require('@google-cloud/compute'); | |
// Creates a client | |
const compute = new Compute(); | |
async function quickstart() { | |
// Create a new VM using the latest OS image of your choice. | |
const zone = compute.zone('us-central1-c'); |
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
/* Input */ | |
@custom-media --medium (min-width: 640px); | |
a { | |
color: red; | |
@media (--medium) { | |
color: green; | |
} | |
} |
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
<div id="off-canvas" class="off-canvas offcanvas-full-screen" data-off-canvas data-transition="overlap"> | |
<div class="offcanvas-full-screen-inner"> | |
<button class="offcanvas-full-screen-close" aria-label="Close menu" type="button" data-close> | |
<span aria-hidden="true">×</span> | |
</button> | |
<?php joints_off_canvas_nav(); ?> <!-- This is the offcanvas/mobile nav --> | |
<?php joints_top_nav(); ?> <!-- This is the top nav --> |
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 | |
function remove_diets_slug($post_link, $post, $leavename) { | |
if (!in_array($post->post_type, array('mat_diets')) || 'publish' != $post->post_status) | |
return $post_link; | |
$post_link = str_replace('/diets/', '/', $post_link); | |
return $post_link; | |
} | |
add_filter('post_type_link', 'remove_diets_slug', 10, 3); |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) https://YOURLIVEURL.com/wp-content/uploads/$1 [L] |
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
const path = require('path'); | |
// Used to create a local server | |
const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
// Use to minify JS | |
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | |
// Used to compile Sass into CSS | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); |
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 | |
// Sets Beaver Builder as the default editor. | |
function make_beaver_builder_default( $post_ID, $post, $update ) { | |
if ( ! $update ) { | |
update_post_meta( $post_ID, '_fl_builder_enabled', true ); | |
} | |
} | |
add_action( 'wp_insert_post', 'make_beaver_builder_default', 10, 3 ); |
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
// Sets Beaver Builder as the default editor. | |
function make_beaver_builder_default( $post_ID, $post, $update ) { | |
if ( ! $update ) { | |
update_post_meta( $post_ID, '_fl_builder_enabled', true ); | |
} | |
} | |
add_action( 'wp_insert_post', 'make_beaver_builder_default', 10, 3 ); |
NewerOlder