⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
Somebody asked me how to become a Product Manager. Here's what I wrote them. | |
--------------------------------------------------------------------------- | |
Hi Jon, | |
Those are a lot of questions. Let me try to simplify it. | |
I think a Product Manager is a person who is responsible for determining | |
what a product should be and how it should evolve. This is a design role |
(function (e, t) { | |
var n = window.jQuery || window.$ || window.optimizely && window.optimizely.$; | |
n("head").append("<scr" + "ipt>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-49590743-2', 'derp',{'name': 'optimizelyspytool'});ga('optimizelyspytool.send', 'pageview','/" + (!t ? "x/" : "") + "'+location.hostname);</sc" + "ript>"); | |
n("#opt_container,#opt_styles,#opt_backdrop").remove(); | |
n("body").append("<div id='opt_backdrop'/>"); | |
n("head").append("<style id='opt_styles'> #opt_backdrop {position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:99999998} #opt_container{ position:fixed; overflow-y:auto; background:#FFF; |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
add_action( 'woocommerce_cart_actions', 'move_proceed_button' ); | |
function move_proceed_button( $checkout ) { | |
echo '<a href="' . esc_url( WC()->cart->get_checkout_url() ) . '" class="checkout-button button alt wc-forward" >' . __( 'Proceed to Checkout', 'woocommerce' ) . '</a>'; | |
} |
<script> | |
(function(){ | |
var userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
var mobile = (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |
require 'resolv' | |
class Domain | |
def mxers(domain) | |
mxs = Resolv::DNS.open do |dns| | |
ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) | |
ress.map { |r| [r.exchange.to_s, IPSocket::getaddress(r.exchange.to_s), r.preference] } | |
end | |
return mxs |
<?php | |
/** | |
* Open Graph protocol for WordPress | |
* @version 0.9.2 | |
* @author makoto_kw | |
* @link https://gist.github.com/3399585 | |
*/ | |
// key into custom fields for description. Default is for All in One SEO Pack | |
define('WP_OGP_POST_DESCRIPTION_KEY', '_aioseop_description'); |
(function () | |
{ | |
//Build a pseudo-class to prevent polluting our own scope. | |
var api = { | |
Settings: {}, | |
Vox: {}, | |
Start: function () | |
{ | |
//Get the *.myshopify.com domain | |
var shop = Shopify.shop; |
It's very simple to get started with Liquid. A Liquid template is rendered in two steps: Parse and Render. For an overview of the Liquid syntax, please read [[Liquid for Designers]].
@template = Liquid::Template.parse("hi {{name}}") # Parses and compiles the template
@template.render( 'name' => 'tobi' ) # Renders the output => "hi tobi"