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 today = new Date(); | |
Date.prototype.stdTimezoneOffset = function() { | |
var jan = new Date(this.getFullYear(), 0, 1); | |
var jul = new Date(this.getFullYear(), 6, 1); | |
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); | |
} | |
Date.prototype.dst = function() { | |
return this.getTimezoneOffset() < this.stdTimezoneOffset(); |
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 ( ! class_exists('WP_List_Table')) { | |
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); | |
} | |
class Events_List_Table extends WP_List_Table | |
{ | |
function __construct() | |
{ | |
global $status, $page; |
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/sh | |
PHPCS=`which phpcs` | |
PHPCBF=`which phpcbf` | |
if [ -z $PHPCS ] || [ -z $PHPCBF ] | |
then | |
printf "\n\e[38;5;255,255,255m" | |
printf "💥 Error: The required tools 'phpcs' and/or 'phpcbf' could not be found in your path.\n\n" | |
printf "You can install both tools globally by running:\n\n" |
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 | |
/** | |
* WordPress class - Manages the WordPress XML file and gets all data from that. | |
*/ | |
class Wordpress | |
{ | |
public static $wpXML; |
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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.IO; | |
using System.Reflection; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace webnetconf.website.Helpers |
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 | |
add_action('wp_enqueue_scripts', function() { | |
if ( ! is_admin()) { | |
// Get rid of the default jQuery | |
wp_deregister_script('jquery'); | |
// For non-mobile devices | |
if ( ! $wp_is_mobile()) { | |
wp_register_script('jquery-js', JS_PUBLIC_URI . 'vendor/jquery/jquery.min.js', array(), '', false); |
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 acf_json_save_point ($path) { | |
return __DIR__.'/data/acf'; | |
} | |
function acf_json_load_point ($path) { | |
return [__DIR__.'/data/acf']; | |
} |
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
<a href="/contact">Contact me</a> | |
<script> | |
const link = document.querySelector("a"); | |
link.addEventListener("mouseenter", () => { | |
const css = "<link rel=preload as=style href=contact.css>"; | |
document.head.insertAdjacentHTML("beforesend", css); | |
}, { | |
once: true |
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
<!-- | |
A set of performance optimizations for development that vastly increase application startup time. | |
Should not be used in production, as they largely disable forensic diagnostics that you'd want there over fast startup time after a compile. | |
--> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<hooks> | |
<hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel"> | |
<patch:delete /> |
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
18328 13:54:20 INFO HttpModule is being initialized | |
18328 13:54:20 INFO | |
18328 13:54:20 INFO ********************************************************************** | |
18328 13:54:20 INFO ********************************************************************** | |
18328 13:54:20 INFO Sitecore started | |
18328 13:54:20 INFO Sitecore.NET 8.2 (rev. 161115) | |
18328 13:54:20 INFO | |
18328 13:54:20 INFO c:\inetpub\wwwroot\habitat.dev.local\website\bin\antlr3.runtime.dll (Antlr3.Runtime) | |
18328 13:54:20 INFO c:\inetpub\wwwroot\habitat.dev.local\website\bin\castle.core.dll (Castle.Core, Castle.Core 3.3.3 for .NETFramework v4.5, 3.3.3.58) | |
18328 13:54:20 INFO c:\inetpub\wwwroot\habitat.dev.local\website\bin\componentart.web.ui.dll () |
NewerOlder