This file has been truncated, but you can view the full file.
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
[{"code":"UTK","name":"Utirik Airport","lat":"11.222","long":"169.852005","cca2":"MH","city":"Utirik Island"},{"code":"OCA","name":"Ocean Reef Club Airport","lat":"25.325399398804","long":"-80.274803161621","cca2":"US","city":"Key Largo"},{"code":"PQS","name":"Pilot Station Airport","lat":"61.934601","long":"-162.899994","cca2":"US","city":"Pilot Station"},{"code":"CSE","name":"Crested Butte Airpark","lat":"38.851918","long":"-106.928341","cca2":"US","city":"Crested Butte"},{"code":"JCY","name":"LBJ Ranch Airport","lat":"30.251800537100003","long":"-98.62249755859999","cca2":"US","city":"Johnson City"},{"code":"PMX","name":"Metropolitan Airport","lat":"42.223300933800004","long":"-72.31140136719999","cca2":"US","city":"Palmer"},{"code":"NUP","name":"Nunapitchuk Airport","lat":"60.905591","long":"-162.440454","cca2":"US","city":"Nunapitchuk"},{"code":"ICY","name":"Icy Bay Airport","lat":"59.96900177","long":"-141.662002563","cca2":"US","city":"Icy Bay"},{"code":"KKK","name":"Kalakaket Creek AS Airport","lat":" |
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
class ApplicationController < ActionController::Base | |
before_action :authenticate_json_request!, if: :json_request? | |
def json_request? | |
request.format.json? | |
end | |
protected |
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
import React, { Component } from 'react' | |
import { View, TextInput, Text } from 'react-native' | |
import Container from '../components/Container' | |
import RoundedButton from '../components/RoundedButton' | |
import Reactotron from 'reactotron-react-native' | |
import { actionCreators } from '../redux/signUpRedux' | |
import { connect } from 'react-redux' | |
import { signUp } from '../actions' | |
const mapStateToProps = (state) => ({ |
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
$attributes: 'margin', 'padding'; | |
$directions: 'top', 'right', 'bottom', 'left'; | |
$sizes: '-mini', '-small', '', '-big'; | |
$calculations: 0.25, 0.5, 1, 2; | |
$base: 1rem; | |
@each $attribute in $attributes { | |
@each $direction in $directions { | |
$attribute-name: #{$attribute}-#{$direction}; | |
@each $size in $sizes { |
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
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_delay": 50, | |
"auto_complete_selector": "text, source - comment", | |
"auto_complete_size_limit": 4194304, | |
"auto_complete_triggers": | |
[ | |
{ |
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
@import "compass/utilities/sprites"; | |
@import "compass/css3/background-size"; | |
@mixin all-2x-sprites($map, $map2x) { | |
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { |
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
def self.mass_insert(model, episodes, user) | |
existing_episodes_ids = model.where(user_id: user.id, show_id: episodes.first.show_id).pluck(&:episode_id) | |
columns = [:user_id, :season_id, :episode_id, :show_id, :created_at, :updated_at] | |
inserts = [] | |
episodes = episodes.reject { |e| existing_episodes_ids.include?(e.id) } | |
episodes.each do |episode| | |
inserts.push "(#{user.id}, #{episode.season_id}, #{episode.id}, #{episode.show_id}, '#{Time.now.utc}', '#{Time.now.utc}')" | |
end | |
sql = "INSERT INTO #{model.to_s.tableize} (#{columns.map(&:to_s).join(",")}) VALUES #{inserts.join(",")}" | |
ActiveRecord::Base.connection.execute(sql) |
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 Markables | |
class MarkableBase | |
def initialize(id) | |
@id = id | |
end | |
def something_smart | |
puts "something_smart" | |
end |
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
namespace :db do | |
desc "Fetch data from production" | |
task :fetch, [:model] => [:environment] do |t, args| | |
#Requirements | |
require "net/scp" | |
#Setup | |
models_to_fetch = [] | |
#Validate the argument |
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
.dotted-progress { | |
@include position(absolute, 0, 0, 0, 0); | |
$indicators: 60; | |
$groups: 3; | |
$groupSize: $indicators / $groups; | |
$groupSpacing: 2; | |
$singleDegree: 360 / ($indicators + $groups * $groupSpacing); | |
@for $i from 1 through $indicators { | |
$index: $i - 1; | |
$groupOffset: $singleDegree * floor(($index / $groupSize)) * $groupSpacing; |
NewerOlder