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
/** | |
* JavaScript code to detect available availability of a | |
* particular font in a browser using JavaScript and CSS. | |
* | |
* Author : Lalit Patel | |
* Website: http://www.lalit.org/lab/javascript-css-font-detect/ | |
* License: Apache Software License 2.0 | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* Version: 0.15 (21 Sep 2009) | |
* Changed comparision font to default from sans-default-default, |
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: Simple Popular Posts Lite | |
Plugin URI: - | |
Description: - | |
Version: 2015.03.01 | |
Author: khromov | |
Author URI: http://snippets.khromov.se | |
License: GPL2 | |
*/ |
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 my_rest_prepare_post( $data, $post, $request ) { | |
$_data = $data->data; | |
$thumbnail_id = get_post_thumbnail_id( $post->ID ); | |
$thumbnail = wp_get_attachment_image_src( $thumbnail_id ); | |
$_data['featured_image_thumbnail_url'] = $thumbnail[0]; | |
$data->data = $_data; |
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
{ | |
"origin": [ | |
"<svg width=\"400\" height=\"200\">#pattern#</svg>" | |
], | |
"circlecolor": [ | |
"pink", | |
"cyan", | |
"yellow", | |
"orange", | |
"gray", |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Oscilloscope</title> | |
<style type="text/css"> | |
.visualizer { | |
display: block; | |
width: 100%; | |
height: auto; |
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
#!/usr/bin/env bash | |
########################################################################### | |
# Originally written by: Henrik Bengtsson, 2014 | |
# https://github.com/HenrikBengtsson/speedtest-cli-extras | |
# Modified to use IFTTT by: Alasdair Allan, 2015 | |
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html] | |
########################################################################### | |
# Character for separating values | |
# (commas are not safe, because some servers return speeds with commas) |
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
Disable REST Api without Plugins | |
https://rudrastyh.com/wordpress/disable-rest-api.html | |
Add featured image & alt text to WP REST API | |
https://allisontarr.com/2021/10/13/add-featured-image-alt-text-to-wp-rest-api/ | |
Allow ALL cross origin requests to WordPress REST API | |
https://github.com/Shelob9/rest-all-cors | |
WordPress theme using Rest API and Vue.js |
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 // Don't copy this line if you are inserting in a file that has it already. | |
/** | |
* ACF Options Page | |
* | |
* Instructions: | |
* Add more languages to the array below: $languages | |
* | |
* @author: Zeshan Ahmed <https://zeshanahmed.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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.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
// $ npm install | |
// $ gulp serve | |
// $ open http://localhost:8080 | |
var gulp = require('gulp'), | |
del = require('del'), | |
scss = require('gulp-sass'), | |
htmlmin = require('gulp-htmlmin'), | |
cleancss = require('gulp-clean-css'), | |
connect = require('gulp-connect'), |