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
.some-component { | |
:not(.reduced-motion) & { | |
animation: animation-name 3s linear infinite; | |
} | |
} |
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 $ = require('nodobjc') | |
$.framework('Foundation') | |
$.framework('AppKit') | |
var GetSongs = $.NSObject.extend('Delegate'); | |
GetSongs.addMethod('getMySongs:', 'v@:@', function(self, _cmd, notif){ | |
var userInfo = notif('userInfo') | |
var keys = userInfo('keyEnumerator'); |
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 strict'; | |
var $ = require('nodobjc'); | |
// Load the AppKit framework. | |
$.framework('AppKit'); | |
// Create delegate that gets notified | |
var Delegate = $.NSObject.extend('Delegate'); |
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
/* Cocoa application event loop implementation for NodObjC. | |
* Code created for https://github.com/TooTallNate/NodObjC/pull/56 | |
* Working as of 2015-Jan-11 on Mac OS 10.10, Node 0.10.35, NodObjC 1.0.0 | |
* | |
* Copyright (c) 2015, Shane Holloway | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
*/ |
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: My Plugin | |
* Description: A sample plugin with class autoloader, for object-oriented programming. | |
* Version: 0.1 | |
* Plugin URI: http://shaunscovil.com/ | |
* Author: Shaun Scovil | |
* Author URI: http://shaunscovil.com/ | |
* 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 | |
/** | |
* A helper class to implement arbitrary content at arbitrary URLs without a supporting post or page. | |
* Inherit from this class and implement the render_page method | |
* | |
* @author: Tom J Nowell ww.tomjn.com | |
* @License: GPL 2+ | |
*/ | |
abstract class Tomjn_Custom_Page { |
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_function() { | |
$start = microtime(true); | |
// function code here | |
$time_taken = microtime(true) - $start; | |
wp_die( $time_taken ); // in seconds | |
} |
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
// | |
// AppDelegate.m | |
// | |
// | |
// Created by Cory D. Wiles on 10/8/12. | |
// Copyright (c) 2013 Cory D. Wiles. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "iTunes.h" |
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
DELETE pm | |
FROM wp_postmeta pm | |
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id | |
WHERE wp.ID IS NULL |
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
<html> | |
<head> | |
<title>Standalone Form Component</title> | |
</head> | |
<body> | |
<form action="#" method="post"> | |
<?php echo $view['form']->widget($form); ?> | |
<input type="submit" /> | |
</form> | |
</body> |
NewerOlder