With options -e
, -n
, -p
, perl can do what grep/awk/sed can, what about ruby?
Let's take the result of ls -l
as input and process it with ruby
\ls -l | ruby -ne 'print if /^d/'
\ls -l | ruby -ne 'puts split(/\s+/).last if /^d/'
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
UPDATE wp_options SET option_value = replace(option_value, 'OLD_SITE_URL', 'NEW_SITE_URL') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'OLD_SITE_URL','NEW_SITE_URL'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'OLD_SITE_URL', 'NEW_SITE_URL'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'OLD_SITE_URL', 'NEW_SITE_URL'); |
/**********************************************/ | |
/* | |
/* IR_Black Skin by Ben Truyman - 2011 | |
/* | |
/* Based on Todd Werth's IR_Black: | |
/* http://blog.toddwerth.com/entries/2 | |
/* | |
/* Inspired by Darcy Clarke's blog post: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
#!/usr/bin/osascript | |
on run args | |
display notification (item 2 of args) with title (item 1 of args) | |
end |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
interface IValue<T> { | |
type: 'value' | |
value: T | |
} | |
interface IError<E extends Error> { | |
type: 'error' | |
error: E | |
} |
# Set OCTOKIT_ACCESS_TOKEN to authenticate with a PAT | |
# Something like OCTOKIT_ACCESS_TOKEN=<<TOKEN>> bundle exec ruby create-org-montage-script.rb | |
require "octokit" | |
Octokit.auto_paginate = true | |
# Replace <<ORG_NAME>> with your GitHub org | |
members = Octokit.org_members "<<ORG_NAME>>" |