Skip to content

Instantly share code, notes, and snippets.

@nb
nb / gist:755736
Created December 26, 2010 23:47
Marketing is not a dirty word

Marketing is not a dirty word

The most unfair criticism of business folks is that they are just “marketers,” which is somewhat of a negative label in the tech sector. I think marketing gets a bad rap. In MBA terms, there are four Ps that define marketing: product, price, placement, and promotion. Defining the product and price is a creative process. The goal is to develop a product idea—sold for a profit—that matches the needs of the targeted customer. Research, analysis, and creative work are necessary in order to succeed. Placement, the third P, regards how customers will obtain the product (through a web site? the supermarket? the trunk of Fred’s car?).

Finally, promotion—what marketing is often stereotyped to mean—is how to spread the positive word about the product to influential people and potential customers. Surprisingly, promotion is a small part of a business analyst or product manager’s time (maybe 10–20%). So, marketing plans define much more than what the ads will

@nb
nb / guided-tour-api.php
Created October 4, 2011 12:14
Guided Tour/Pointer API
<?php
/*
Guided Tour/Pointer API
Notes:
- exit button is by default
- next button is there if another pointer is linked to this one via previous-pointer
- if no attach-to, put it in the center if the window
- tour and pointer slugs are used for IDs in HTML and keys in user options
@nb
nb / bootstrap-sample.php
Created August 5, 2012 19:27
Sample plugin tests config files
<?php
define( 'WP_TESTS_PATH', '<Enter the path to your unit-tests checkout>' );
$GLOBALS['wp_tests_options'] = array(
'active_plugins' => array( '<plugindir/<plugin>.php' ),
);
require rtrim( WP_TESTS_PATH, DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . 'bootstrap.php';
@nb
nb / class-query-iterator.php
Created November 12, 2012 15:34
WordPress Chunk Query Iterators
<?php
/**
* Iterates over results of a query, split into many queries via LIMIT and OFFSET
*/
class QueryIterator implements Iterator {
var $limit = 500;
var $query = '';
var $global_index = 0;
<?php
public function notify_project_owner( $post_id ) {
if( 'project' == get_post_type() ) {
if( 'publish' == get_post_status( $post_id ) ) {
if( 'true' != get_post_meta( $post_id, 'project_owner_emailed', true ) ) {
$this->mailer->set_subject( __( 'Your Project Has Been Published!', 'cj' ) );
$this->mailer->set_message( __( 'Need filler text.', 'cj' ) );
$this->mailer->send_mail( $this->temp_email );
@nb
nb / composer.json
Last active December 14, 2015 03:49
{
"config" : {
"vendor-dir": "."
},
"require": {
"phpunit/phpunit": "*",
"squizlabs/php_codesniffer": "*",
"nb/oxymel": "dev-master"
}
}
@nb
nb / fork.c
Last active December 15, 2015 00:29
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
/* MB of memory to allocate */
#define MB 100
/* How many processes to spawn */
#define FORKS 50
/* How many random elements to change in the child process */
@nb
nb / show_off.rb
Last active December 15, 2015 15:09
def twice(name, &blk)
yield 1, 2
yield [1, 2]
blk.call(1, 2)
end
a, b = 1, 2
10.times do
puts 'toshko'
<?php
$pids = array();
for($i=0; $i<10; ++$i) {
$pid = pcntl_fork();
if ($pid) {
$pids[] = $pid;
} else {
sleep(2);
echo "Child " . posix_getpid() . " slept enough.\n";
for i in `curl -s https://api.github.com/orgs/impromptu/repos | json -a name`; do hub clone Impromptu/$i; done