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 SwiftUI | |
import CoreData | |
struct ContentView: View { | |
@Environment(\.managedObjectContext) private var viewContext | |
@ObservedObject var viewModel1: ViewModel = ViewModel() | |
@ObservedObject var viewModel2: ViewModel = ViewModel() | |
@ObservedObject var viewModel3: ViewModel = ViewModel() | |
@ObservedObject var viewModel4: ViewModel = ViewModel() |
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
const googleGeoCode = (city, callback) => { | |
const url = `https://maps.googleapis.com/maps/api/geocode/json`; | |
const data = { | |
address: city, | |
key: googleClientAPIKey | |
} | |
$.ajax({ url: url, data: data, success: callback, dataType: 'json' }); |
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
<!-- current style, would like similar style for link --> | |
<% content_for :description, "#{@post.description}" %> |
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
# WORKS: Hits the appropriate blocks | |
def self.included(clazz) #includes module as a class method | |
clazz.class_eval do | |
rescue_from StandardError do |e| | |
respond(:standard_error, 500, e.to_s) | |
end | |
rescue_from ActiveRecord::RecordNotFound do |e| | |
respond(:record_not_found, 404, e.to_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
<div class="tradingview-widget-container"> | |
<div class="tradingview-widget-container__widget"></div> | |
<div class="tradingview-widget-copyright"><a href="https://www.tradingview.com/symbols/FX-EURUSD/" rel="noopener" target="_blank"><span class="blue-text">EURUSD Rates</span></a> by TradingView</div> | |
<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-single-quote.js" async> | |
{ | |
"symbol": "FX:EURUSD", | |
"width": 350, | |
"colorTheme": "light", | |
"isTransparent": false, | |
"locale": "en" |
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 TrendingUserSerializer | |
include FastJsonapi::ObjectSerializer | |
set_type :user | |
attribute :id, :nickname, :karma, :picture | |
end | |
class TrendingListsSerializer | |
include FastJsonapi::ObjectSerializer | |
set_type :list | |
belongs_to :user, serializer: Discoveries::TrendingUserSerializer |
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
{ | |
: data => [{ | |
: id => "88", | |
: type =>: content, | |
: attributes => { | |
: is_sponsored => false,: url => "https://www.youtube.com/watch?v=BmCTQ_mkzHU",: title => "Youtube video title",: created_at => Tue, 18 Jun 2019 16: 59: 26 UTC + 00: 00,: bounty_count => 0,: user_has_bounty => false | |
}, | |
: relationships => { | |
: lists => { | |
: data => [{ |
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 logo from './logo.svg'; | |
import './App.css'; | |
import {styled} from 'styletron-react'; | |
const Panel = styled('div', { | |
backgroundColor: 'lightblue', | |
fontSize: '12px', | |
'@media (max-width: 768px)': { |
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 from 'react'; | |
import styled from 'styled-components'; | |
import CursorZoom from 'react-cursor-zoom'; | |
const StyledImageZoom = styled(CursorZoom)` | |
border: 1px solid black; | |
` | |
const ImageZoom = () => { | |
return ( | |
<StyledImageZoom |
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 from 'react'; | |
import styled from 'styled-components'; | |
import CursorZoom from 'react-cursor-zoom'; | |
const StyledImageZoom = styled(CursorZoom)` | |
border: 1px solid black; | |
` | |
const ImageZoom = () => { | |
return ( |
NewerOlder