Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
| defmodule Json do | |
| def flatten(%{} = json) do | |
| json | |
| |> Map.to_list() | |
| |> to_flat_map(%{}) | |
| end | |
| def flatten(%{} = json) when json == %{}, do: %{} | |
| defp to_flat_map([{_k, %{} = v} | t], acc), do: to_flat_map(Map.to_list(v), to_flat_map(t, acc)) | |
| defp to_flat_map([{k, v} | t], acc), do: to_flat_map(t, Map.put_new(acc, k, v)) |
| b2d(){ | |
| boot2docker $1; | |
| } | |
| b2d poweroff | |
| b2d delete | |
| b2d init | |
| b2d up |
| import Foundation | |
| extension String | |
| { | |
| var length: Int { | |
| get { | |
| return countElements(self) | |
| } | |
| } | |
| @implementation UITextView (RSExtras) | |
| static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
| /*[s length] is assumed to be 0 or 1. s may be nil. | |
| Totally not a strict check.*/ | |
| if (s == nil || [s length] < 1) | |
| return NO; |
There are many (old) clients available:
The Google Analytics API is at v3 (at time of writing).
This example uses Google's Ruby API client to access Analytics. Use https://github.com/google/google-api-ruby-client (Google supported).
| // | |
| // UIView+DEFrameAdditions.h | |
| // | |
| // Copyright (c) 2011-2013 Double Encore, Inc. All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
| // Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
| // Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer | |
| // in the documentation and/or other materials provided with the distribution. Neither the name of the Double Encore Inc. nor the names of its | |
| // contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |