This file contains hidden or 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
| defp set_status(:ok, site) do | |
| ConCache.update(:sites, site.name, fn(old) -> | |
| case old do | |
| %{incident_key: incident_key} -> | |
| Pagexduty.Server.resolve("#{site.name} health check has passed", incident_key) | |
| _ -> | |
| nil | |
| end | |
| {:ok, %{status: :ok}} |
This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
This file contains hidden or 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
| def site_checked(site = %{status: status}, status) do | |
| payload = {:nochange, site, %{}} | |
| GenServer.cast(__MODULE__, {:notify, {:site_checked, payload}}) | |
| end | |
| def site_checked(site = %{status: new_status, reason: reason}, old_status) do | |
| payload = {:change, site, %{from: old_status, to: new_status, reason: reason}} | |
| GenServer.cast(__MODULE__, {:notify, {:site_checked, payload}}) | |
| end |
This file contains hidden or 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
| def handle_event({:site_checked, {:change, site, payload}}, state) do | |
| %{from: old_status, to: new_status} = payload | |
| trigger_pagerduty(site, new_status, old_status) | |
| {:ok, state} | |
| end | |
| def handle_event(_, state), do: {:ok, state} |
This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| actions: { | |
| myAction() { | |
| // do big action! | |
| return true; | |
| } |
This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| }); |
This file contains hidden or 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
| import Ember from 'ember'; | |
| const { computed } = Ember; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| model: { | |
| name: 'will' | |
| }, |
This file contains hidden or 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
| import Ember from 'ember'; | |
| import AdultValidations from '../validations/adult'; | |
| import ChildValidations from '../validations/child'; | |
| import { reservedEmails } from '../validators/uniqueness'; | |
| import { schema } from '../models/user'; | |
| const { get } = Ember; | |
| const { keys } = Object; | |
| export default Ember.Controller.extend({ |
This file contains hidden or 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
| #!/bin/sh | |
| # Base16 Eighties - Shell color setup script | |
| # Chris Kempson (http://chriskempson.com) | |
| if [ "${TERM%%-*}" = 'linux' ]; then | |
| # This script doesn't support linux console (use 'vconsole' template instead) | |
| return 2>/dev/null || exit 0 | |
| fi | |
| color00="2d/2d/2d" # Base 00 - Black |
This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |