Skip to content

Instantly share code, notes, and snippets.

John Cyrill Corsanes jcchikikomori

Block or report user

Report or block jcchikikomori

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jcchikikomori / wordpress-tinymce.js
Created Nov 18, 2019 — forked from RadGH/wordpress-tinymce.js
Get/Set content of a TinyMCE visual or text editor with JavaScript
View wordpress-tinymce.js
Based on:
These functions provide a simple way to interact with TinyMCE (wp_editor) visual editor.
This is the same thing that WordPress does, but a tad more intuitive.
Additionally, this works for any editor - not just the "content" editor.
jcchikikomori / script.js
Created Nov 14, 2019 — forked from ihorvorotnov/script.js
Using wp_is_mobile() in WordPress to detect mobile users (phones and tablets)
View script.js
jQuery( document ).ready( function($) {
if ( $( "body" ).hasClass("wp-is-mobile"){
/* Do javascript for mobile */
/* Do javascript for non-mobile */
jcchikikomori / cors_support.conf
Created Oct 25, 2019 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
View cors_support.conf
# CORS header support
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
# include cors_support.conf;
# As of Nginx 1.7.5, add_header supports an "always" parameter which
View gist:bc7093ca03e4277a7e1483d8ce983b41
# Install brew
/usr/bin/ruby -e "$(curl -fsSL"
# Install composer
brew install homebrew/php/composer
composer global require "squizlabs/php_codesniffer=*"
# Add to your .bash_profile
jcchikikomori / cdn-jquery.php
Created Oct 16, 2019 — forked from Shelob9/cdn-jquery.php
Replace WordPress' jQuery with CDN jQuery of the right version
View cdn-jquery.php
add_action( 'init', function(){
if ( ! is_admin()) {
if( is_ssl() ){
$protocol = 'https';
}else {
$protocol = 'http';
/** @var WP_Scripts $wp_scripts */
global $wp_scripts;
jcchikikomori / .htninja
Created Oct 10, 2019
NinjaFirewall config for Bedrock
View .htninja
| NinjaFirewall optional configuration file |
| |
| See: |
| |
| |
jcchikikomori / bedrock-project.conf
Last active Oct 10, 2019
LINUX VALET HOSTS for BEDROCK - because valet link command was a pussy
View bedrock-project.conf
server {
listen 80;
server_name bedrock-mohawk.localhost;
charset utf-8;
root /home/jccorsanes/www/bedrock-project/web;
index index.php index.html;
#access_log /usr/local/var/log/nginx/access.log;
#error_log /usr/local/var/log/nginx/error.log;
jcchikikomori / NGINX-CORS+CSP.conf
Created Oct 8, 2019 — forked from adrianorsouza/NGINX-CORS+CSP.conf
Nginx CORS and CSP configuration for wildcard origin domains
server {
add_header Content-Security-Policy "default-src 'none'";
add_header X-Content-Security-Policy "default-src 'none'";
add_header X-WebKit-CSP "default-src 'none'";
add_header "Access-Control-Allow-Headers" "X-Requested-With";
if ( $http_origin ~* (https?://(.+\.)?(domain1|domain2|domain3)\.(?:me|co|com)$) ) {
jcchikikomori / custom-ajax-spotify.php
Created Sep 23, 2019 — forked from ivanlebanov/custom-ajax-spotify.php
Spotify API integration with WordPress
View custom-ajax-spotify.php
function ajax_enquiry_init(){
wp_register_script('jquery', '' );
wp_register_script('main', get_template_directory_uri() . '/js/main.js', array('jquery') );
wp_localize_script( 'main', 'ajax_auth_object', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
You can’t perform that action at this time.