View Default (OSX).sublime-keymap
[ | |
{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} }, | |
{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} }, | |
] |
View statusboardmsg.sh
#!/bin/bash | |
echo -e "Message: \c " | |
read message | |
echo $message | ssh -i ~/.ssh/rsa.pem user@host "cat > /var/www/message.txt" | |
echo -e "Done.\n\n" |
View slack-call.php
<?php | |
date_default_timezone_set('America/Vancouver'); | |
if ( date('G') > 7 && date('G') < 19 ) { // only update between 7am and 7pm | |
require('slack-api.php'); // via Yong Zhen <yz@stargate.io>: https://github.com/10w042/slack-api/blob/master/Slack.php | |
// authentication | |
$token = 'xxxx-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxx'; | |
// options |
View read-gmail-inbox-with.php
<h2>Recent Emails</h2> | |
<?php | |
$service = new Google_Service_Gmail($client); | |
$results = $service->users_messages->listUsersMessages('me',array('maxResults' => 5)); | |
$messageList = $results->getMessages(); | |
$inboxMessage = array(); |
View restrict-multiple-users.php
<?php | |
$restricted = array( | |
56834 => 67, // user id => page id | |
56832 => 764, // user id => page id | |
56901 => 'ai1ec_event', // user id => post_type | |
); | |
// SOME CSS ------------------------------------------------------------ | |
add_action('admin_head',function () { |
View phpmyadmin-router.php
<?php | |
header('Location: http://localhost/phpmyadmin/'.(strnatcmp(phpversion(),'5.5.0') >= 0 ? "new" : "old")."/"); | |
?> |
View extending-wc-square.php
<?php | |
add_action('wc_square_loaded',function(){ | |
if (class_exists('Woocommerce_Square')) { | |
add_action( 'plugins_loaded', function(){ | |
// get WooCommerce_Square | |
$wcsm = Woocommerce_Square::instance(); | |
// startup, (aka `Woocommerce_Square::init()` rebuilt) |
View myblock.js
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
withAPIData = wp.components.withAPIData; | |
registerBlockType( 'sandbox/myblock', { | |
title: 'My Block', | |
icon: 'archive', | |
category: 'widgets', | |
// representation of the block in the editor's context |
View check-if-using-gutenberg.php
<?php | |
add_action('body_class', function($classes){ | |
if (function_exists('the_gutenberg_project') && gutenberg_post_has_blocks( get_the_ID() ) ) | |
$classes[] = 'using-gutenberg'; | |
return $classes; | |
}); |
OlderNewer