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
if (!function_exists('log_it')) { | |
function log_it($message) | |
{ | |
if (WP_DEBUG === true) { | |
if (is_array($message) || is_object($message)) { | |
error_log(print_r($message, true)); | |
} else { | |
error_log($message); | |
} | |
} |
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 { createUseStyles, useTheme } from "react-jss"; | |
import { WithStyles as WithStylesI, Theme } from "../../types"; | |
export const WithStyles = ({ children, styles }: WithStylesI) => { | |
const useStyles = createUseStyles((theme: Theme) => styles(theme)); | |
const theme = useTheme(); | |
const classes = useStyles({ theme }); | |
return children(classes); | |
}; |
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
{"lastUpload":"2022-03-02T14:57:25.998Z","extensionVersion":"v3.4.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
## - Create the repo on the server | |
mkdir repo && cd repo | |
mkdir site.git && cd site.git | |
git init --bare |
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
/*------------------------------------------------------------------------------ | |
Gulpfile.js | |
------------------------------------------------------------------------------*/ | |
// Theme information (name, starting theme version) | |
var theme = 'zoe', | |
version = '0.2.1'; | |
// Set the paths you will be working with | |
var phpFiles = ['./**/*.php', './*.php'], | |
htmlFiles = ['./**/*.html', './*.html'], |
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 | |
/** | |
* Write an array to a JSON file. Replace $data with your array, | |
* and skip JSON encoding if you already have JSON | |
*/ | |
function write_data_to_file( $filename ) { | |
$json = file_get_contents( 'http://path.to/external-site/file.json'); | |
$time = time(); | |
file_put_contents( $filename, $json ); | |
} |
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 equalize = function() { | |
var max = Math.max.apply(null, | |
$('.equalize').css('height', 'auto').map(function() { | |
return $(this).outerHeight(); | |
}) | |
); | |
$('.equalize').outerHeight(max); | |
}; | |
// equalize |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// Flex Video Based on Zurb Foundation | |
.flex-video { | |
position: relative; | |
height: 0; | |
padding-bottom: 75%; | |
margin-bottom: 1rem; | |
overflow: hidden; | |
} | |
.flex-video iframe, |
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
npm install gulp jshint gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename gulp-imagemin imagemin-pngquant gulp-cssnano gulp-autoprefixer gulp-zip --save |
NewerOlder