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
<% frame_name = 'calendar_interface' %> | |
<% frame_name = "#{frame_name}_#{@target}" if @target %> | |
<% start_of_month = @display_date.beginning_of_month %> | |
<% cache "ui/calendar/#{frame_name}/#{start_of_month}--#{@selected_date}" do %> | |
<% end_of_month = @display_date.end_of_month %> | |
<% dow_start = @display_date.beginning_of_month.days_to_week_start + 2 %> | |
<% dow_start = dow_start >= 7 ? dow_start - 7 : dow_start %> | |
<% dow_start = dow_start <= 0 ? dow_start + 7 : dow_start %> | |
<% today = Date.today %> |
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
# config/initializers/active_admin.rb | |
#... | |
module ActiveAdmin | |
module Views | |
# Defines a `react_component` active admin component. It allows you | |
# to include react components into active admin using React On Rails. | |
# Example: | |
# |
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
// Copyright (c) 2016 - 2017 Uber Technologies, Inc. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in |
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
namespace :favicons do | |
desc "Build favicons for all platforms" | |
task build: :environment do | |
if /Version/m =~ (`convert -version`) | |
# Main Icon Sizes | |
ico_sizes = %w(16 32) | |
apple_sizes = %w(57 60 72 76 114 120 129 144 152) | |
apple_precomposed_sizes = %w(120 129 152) | |
ms_tile_sizes = %w(144) | |
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
<div id="vue-info"> | |
<div class="info-message info-message-1" :style="{top: html.top, left: html.left, right: html.right, bottom: html.bottom, position: html.position, height: html.height, width: html.width, maxHeight: html.maxHeight, maxWidth: html.maxWidth, display: containerOpen ? 'block' : 'none'}"> | |
<svg class="container" viewbox="0 0 800 700" :style="{top: 0, left: 0, height: svgHeight, width: svgWidth, display: mobile ? 'none' : 'block'}" :class="[svgOpen ? 'open' : '']"> | |
<defs> | |
<filter id="filter-dropshadow" x="0" y="0" width="140%" height="140%"> | |
<feOffset result="offOut" in="SourceAlpha" dx="6" dy="3" /> | |
<feColorMatrix result="matrixOut" in="offOut" type="matrix" | |
values="0 0 0 0 0 | |
0 0 0 0 0 | |
0 0 0 0 0 |
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
@moduledoc """ | |
This uses the secret key base, the defined salt and signed salt from your Rails app to decrypt the Rails session. Checkout: https://github.com/cconstantin/plug_rails_cookie_session_store for a full session encrypter/decrypter for Phoenix. Below is how you would call these functions. | |
def get_session(conn) do | |
# Preload the cookies (If you are not in the browser pipeline | |
conn = Plug.Conn.fetch_cookies(conn) | |
# Get the cookies by the key defined in your Rails app 'config/initializers/session_store.rb' | |
cookie = Map.get(conn.cookies, "_yourappname_session") |