Instantly share code, notes, and snippets.

View font-weight.txt
100 - Thin
200 - Extra Light, Ultra Light
300 - Light
400 - Normal, Book, Regular
500 - Medium
600 - Semi Bold, Demi Bold
700 - Bold
800 - Extra Bold, Ultra Bold
900 - Black, Heavy
View permission.php
<?php
public function user_get_check( \WP_REST_Request $request ) {
// To avoid CORS issue.
if ( $request->get_method() === 'OPTIONS' ) {
return true;
}
$auth_array = $request->get_headers();
View columns-tinymce.js
/* global tinymce */
(function() {
const columnsTinyMCEButton = (function(){
return function(tinyMCE) {
tinyMCE.PluginManager.add( 'columns', function( editor, url ) {
// Add Button to Visual Editor Toolbar
editor.addButton('columns', {
title: 'Insert Column',
cmd: 'columns',
View validate-acf-wysiwyg.php
<?php
/**
* Validate WYSIWYG field so that it outputs only 250 characters
*
* Targets the overview field in the documentation only.
*
* @param bool $valid Check the validity of the field.
* @param string $value The field value.
* @param array $field Array with the field details.
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete_triggers":
[
{
"characters": "<",
"selector": "text.html"
},
{
"characters": "$>:\\",
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/{USER_NAME}}/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
View social-share.js
jQuery(document).ready(function ($) {
'use strict';
$.fn.socShare = function(opts) {
var $this = this;
var $win = $(window);
opts = $.extend({
attr : 'href',
facebook : false,
View Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"A File Icon",
"Alignment",
"Babel",
View gitconfig
credential.helper=osxkeychain
user.email= //
user.name= //
user.signingkey= //
help.autocorrect=0
diff.tool=default-difftool
difftool.default-difftool.cmd='sublime' --wait
core.editor=sublime --wait
core.excludesfile=fullpathto/.gitignore_global //
core.ignorecase=false
View git-colapse.js
$$('div.file-header > div.file-actions > button').map(function(x){x.click()});