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 | |
/* | |
Plugin Name: Materialized Paths | |
Plugin URI: http://crumbls.com | |
Description: Implement materialized paths for WordPress to enable simple searching for child and parent paths. | |
Author: Chase C. Miller | |
Version: 2.0.1a | |
Author URI: http://crumbls.com | |
Text Domain: Crumbls\Plugins\Materialized | |
*/ |
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
language: php | |
php: | |
- 7.0 | |
- 7.1 | |
services: | |
- mysql | |
addons: |
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
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC |
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
//login to your droplet. | |
//1. output the hostname | |
hostname | |
//2. modify the hosts | |
nano /etc/host | |
//3. the first line in this file, should use the hostname on the end. For example: "Lee" | |
127.0.0.1 localhost localhost.domainname Lee |
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 | |
namespace App; | |
use Closure; | |
class CommandEventsListener | |
{ | |
protected $startCallbacks = []; | |
protected $finishCallbacks = []; |
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
<template> | |
<div> | |
<label id="listbox-label" class="block text-sm font-medium text-gray-700"> | |
Assigned to | |
</label> | |
<input type="hidden" :value="selectedValues" name="name"> | |
<div class="mt-1 relative"> | |
<button @click="selected = !selected" type="button" aria-haspopup="listbox" aria-expanded="true" | |
aria-labelledby="listbox-label" | |
class="bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> |
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
<template> | |
<div> | |
<label id="listbox-label" class="block text-sm font-medium text-gray-700" v-text="label"/> | |
<input type="hidden" :value="selectedValues" :name="name"> | |
<div class="mt-1 relative"> | |
<button @click="selected = !selected" type="button" aria-haspopup="listbox" aria-expanded="true" | |
aria-labelledby="listbox-label" | |
class="bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"> | |
<span class="block truncate" v-text="selectedText"/> |
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 | |
/** | |
* Stream-write arrays onto a file on disk as JSON format, to avoid memory leaks. | |
* Written expressly for /u/devourment77 of reddit. | |
* | |
* Copyright (C) 2021 by Vynatu Cyberlabs, Inc. and Felix Lebel | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation |
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
function formatSize(size) { | |
const base = 1000; // 1000 or 1024 | |
const kb = base ** 1; | |
const mb = base ** 2; | |
const gb = base ** 3; | |
let num; | |
num = (size / 1).toFixed(0); | |
if (num < base) return Number(num) + ' B'; |
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 FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* | |
* Updating Objects | |
* | |
* When an action is published, or a Like button pointing to the object clicked, | |
* Facebook will 'scrape' the HTML page of the object and read the meta tags. |
OlderNewer