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
tell application "System Events" | |
-- Pause syncing | |
click menu bar item 1 of menu bar 2 of application process "Dropbox" | |
click menu item "Pause Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox" | |
delay 2 | |
-- Now re-enable syncing | |
click menu bar item 1 of menu bar 2 of application process "Dropbox" | |
click menu item "Resume Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox" | |
end tell |
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
expect 100-continue | |
content-length 1998 | |
connection close | |
x-wc-webhook-delivery-id 36e520ebabc2fa725092ff4a47acedf2 | |
x-wc-webhook-id 3 | |
x-wc-webhook-signature 5poyFy4qB6fdvvT5pGbefZmfkpL48uD47F0WYwfmpo4= | |
x-wc-webhook-event created | |
x-wc-webhook-resource order | |
x-wc-webhook-topic order.created | |
x-wc-webhook-source https://www.website.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
function (user, context, callback) { | |
user.app_metadata = user.app_metadata || {}; | |
if ('stripe_customer_id' in user.app_metadata) { | |
context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id; | |
return callback(null, user, context); | |
} | |
var stripe = require('stripe')('sk_....'); | |
var customer = { |
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
WOW.prototype.addBox = function(element) { | |
this.boxes.push(element); | |
}; | |
// Init WOW.js and get instance | |
var wow = new WOW(); | |
wow.init(); | |
// Attach scrollSpy to .wow elements for detect view exit events, | |
// then reset elements and add again for animation |
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
class SignInModal extends Component { | |
componentDidMount() { | |
this.InputComponent.focus(); | |
} | |
render() { | |
return ( | |
<div> | |
<label>User name: </label> | |
<Input |
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
class Input extends Component { | |
focus() { | |
this.el.focus(); | |
} | |
render() { | |
return ( | |
<input | |
ref={el=> { this.el = el; }} | |
/> |
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
import HomePage from './HomePage.jsx'; | |
import AboutPage from './AboutPage.jsx'; | |
import UserPage from './UserPage.jsx'; | |
import FourOhFourPage from './FourOhFourPage.jsx'; | |
const PAGES = { | |
home: HomePage, | |
about: AboutPage, | |
user: UserPage, | |
}; |
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
class Sortable extends React.Component { | |
componentDidMount() { | |
// Every React component has a function that exposes the | |
// underlying DOM node that it is wrapping. We can use that | |
// DOM node, pass it to jQuery and initialize the plugin. | |
// You'll find that many jQuery plugins follow this same pattern | |
// and you'll be able to pass the component DOM node to jQuery | |
// and call the plugin function. |
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 moment = require('alloy/moment'); | |
// Cloudinary credentials - **Replace these with your creds!!! | |
var cloudName = 'Your_Cloud_Name'; | |
var apiKey = 999999999999; | |
var apiSecret = 'XXXXXXXXXX-XXXXX-XX'; | |
// Image API URL base | |
var apiBaseUrl = 'http://api.cloudinary.com/v1_1/'; | |
// Create and send alert on error | |
function alert(message, title, ok, callback) { |
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 | |
defined( 'ABSPATH' ) or die( 'Poop.' ); | |
/** | |
* Plugin Name: _Sample Admin Notice | |
* Description: Displays a sample admin notice once for admins. (Requires PHP 5.3+.) | |
* Version: 0.1 | |
* Author: Caspar Hübinger | |
* Plugin URI: https://gist.github.com/glueckpress/6befeb937da89025d4d8#file-sample-admin-notice-php | |
* Author URI: https://profiles.wordpress.org/glueckpress | |
* License: GNU General Public License v3 |
NewerOlder