This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CustomDataFormatters | |
version = "1.0"> | |
<SummaryFormatters> | |
<SummaryFormatter | |
formatString = "{(const char *)$VAR.text.data}:s" | |
type = "const class juce::String &"> | |
</SummaryFormatter> | |
<SummaryFormatter | |
formatString = "{(const char *)$VAR.text.data}:s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if Incoming pull has new files in its changeset | |
alias hgnf="hg in -p | grep -B1 'new file'" | |
# start postgres | |
alias pgstart="/usr/local/bin/pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" | |
# Cleanup the "open with" list of OSX by rebuilding its db | |
alias rebuild-openwith="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user" | |
# Kill all processes containing the given string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fact). | |
-export([fac/1]). | |
fac(0) -> 1; | |
fac(N) when N > 0, is_integer(N) -> N * fac(N-1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "get /api/users returns a list of users" do | |
users_as_json = | |
%User{first_name: "Bob", last_name: "Dylan", email: "bob@aol.com"} | |
|> Repo.insert | |
|> List.wrap | |
|> Poison.encode! | |
response = conn(:get, "/api/users") |> send_request | |
assert response.status == 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule SbSso.Router do | |
use Phoenix.Router | |
pipeline :api do | |
plug :accepts, ~w(json) | |
end | |
# /API section | |
scope "/api", alias: SbSso.Api, as: :api do | |
pipe_through :api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api_user_path GET /api/users SbSso.Api.UserController.index/2 | |
api_user_path GET /api/users/:id SbSso.Api.UserController.show/2 | |
api_user_path POST /api/users SbSso.Api.UserController.create/2 | |
api_user_path PATCH /api/users/:id SbSso.Api.UserController.update/2 | |
PUT /api/users/:id SbSso.Api.UserController.update/2 | |
api_user_path DELETE /api/users/:id SbSso.Api.UserController.destroy/2 | |
api_user_subscription_path GET /api/users/:user_id/subs SbSso.Api.SubscriptionController.index/2 | |
api_user_subscription_path GET /api/users/:user_id/subs/:id SbSso.Api.SubscriptionController.show/2 | |
api_user_subscription_path POST /api/users/:user_id/subs SbSso.Api.SubscriptionController.create/2 | |
api_product_path GET /api/products SbSso.Api.ProductController.index/2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ObesebirdApi.Router do | |
use ObesebirdApi.Web, :router | |
pipeline :api do | |
plug :accepts, ["json"] | |
end | |
scope "/api", ObesebirdApi do | |
pipe_through :api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Mix.Config | |
# In this file, we keep production configuration that | |
# you likely want to automate and keep it away from | |
# your version control system. | |
config :obesebird_api, ObesebirdApi.Endpoint, | |
secret_key_base: System.get_env("SECRET_KEY_BASE") | |
# Configure your database | |
config :obesebird_api, ObesebirdApi.Repo, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: elixir | |
elixir: | |
- 1.0.4 | |
otp_release: | |
- 17.4 | |
addons: | |
postgresql: '9.3' | |
before_script: | |
- MIX_ENV=test mix do deps.get, deps.compile, ecto.create, ecto.migrate | |
deploy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ObesebirdApi.Scheduler do | |
use GenServer | |
alias ObesebirdApi.Slot | |
alias ObesebirdApi.Tasks | |
require Logger | |
# Server | |
def init(args) do | |
case Process.send(self, :check, []) do |
OlderNewer