Install xcode command line tools (or check if they're already installed)
xcode-select --install
Do we have libxml installed already?
xsltproc --version
version: 2 | |
# Re-usable blocks to reduce boilerplate | |
# in job definitions. | |
references: | |
container_config: &container_config | |
docker: | |
- image: my-company/circleci:gcloud # We use a custom Alpine Linux base image with the bare minimum | |
working_directory: /tmp/workspace | |
restore_repo: &restore_repo |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
Add the following to your ~/.zshrc
:
function notifyme {
LAST_EXIT_CODE=$?
CMD=$(fc -ln -1)
osascript -e 'on run argv
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
if frontApp is not "Terminal" then
To copy database from one heroku app to another -
heroku pg:backups capture [database_name]
heroku pg:backups restore $(heroku pg:backups public-url --app source_app) DATABASE_URL --app target_app
You can refer to https://devcenter.heroku.com/articles/heroku-postgres-backups for more information.
To copy database from local to heroku -
Dump your local database in compressed format using the open source pg_dump tool: PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
where myuser
is your database username and mydb
is the database name.
import org.gawst.proxy.ui.SwipeListFragment; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.os.Bundle; | |
import android.support.v4.app.LoaderManager.LoaderCallbacks; | |
import android.support.v4.content.Loader; | |
import android.support.v4.widget.CursorAdapter; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.view.View; |
.box { | |
padding: 5px; | |
background: red; | |
margin: 10px; | |
position:relative; | |
z-index: 3; | |
} | |
.drag-target { | |
background: blue; | |
z-index: 1; |
#!/usr/bin/perl | |
$|=1; | |
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
use URI::URL; | |
use HTML::Strip; |
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
=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') |