This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
=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') |
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
#!/bin/sh | |
# ---------------------------------------------------------------------- | |
# Extract the bookmark annotations from the Kobo database. | |
# ---------------------------------------------------------------------- | |
kobodir=/media/KOBOeReader | |
db="$kobodir/.kobo/KoboReader.sqlite" | |
sqlite3 "$db" 'select VolumeID,StartContainerPath,Text,Annotation from Bookmark;' | | |
awk -F'|' 'BEGIN{OFS="|"}{gsub("/", "_", $1); print}' | | |
sort -t/ -k1 -k2 -n -k4 -k5 -k6 -k7 -k8 | | |
sed ' s/[^|]*|// s/[^|]*|// s/|/\n\n/ s/$/\n\n/ ' |
function delay(expressionAsFunction) { | |
var result; | |
var isEvaluated = false; | |
return function () { | |
if (!isEvaluated) | |
result = expressionAsFunction(); | |
return result; | |
}; | |
} |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
--- | |
layout: default | |
title: Archive | |
--- | |
<div class="post"> | |
<h2>Archive</h2> | |
<ul> | |
{% for post in site.posts %} | |
{% unless post.next %} |
mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.
Github will be the main account and bitbucket the secondary.
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".