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
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 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
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
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
Is the line of code below valid Ruby code? If so, what does it do? Explain your answer. | |
-> (a) {p a}["Hello world"] |
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
5 кл | |
Види речень за метою висловлювання. Відеоурок з української мови 5 клас | |
https://www.youtube.com/watch?v=ofoLBvPjIIo | |
6кл | |
числівники https://webpen.com.ua/pages/Morphology_and_spelling/numerals_declination.html | |
8кл | |
прикметниик https://webpen.com.ua/pages/Morphology_and_spelling/adjective_grammatically_characteristic.html |
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
require 'proxy_list_api_client' | |
class ExtractYoutubeVideo | |
def initialize(video_id) | |
@video_id = video_id | |
end | |
def perform | |
extract_video_stream_uri.presence || extract_video_stream_uri(with_proxy: true) | |
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
import apisauce from 'apisauce' | |
const create = () => { | |
const api = apisauce.create({ | |
baseURL: 'https://lyoutube-api-master.herokuapp.com/api/v1', | |
timeout: 20000, | |
responseType: 'json', | |
}) | |
const getVideos = () => { |
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 { Video } from 'expo' | |
import VideoPlayer from '@expo/videoplayer' | |
import { Actions } from 'react-native-router-flux' | |
import api from '../../services/FixtureApi' | |
import Spinner from '../Spinner' | |
interface Props { | |
id: 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
import React from 'react' | |
import { Scene, Router } from 'react-native-router-flux' | |
import Home from './views/Home' | |
import VideoPlayer from './views/VideoPlayer' | |
const AppRouter = () => ( | |
<Router> | |
<Scene key="root" hideNavBar> | |
<Scene key="Home" component={Home} initial /> | |
<Scene key="VideoPlayer" component={VideoPlayer} hideNavBar={true} /> |
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
getVideo: videoId => { | |
return { | |
ok: true, | |
data: require('../fixtures/Video.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
{ | |
"id": "c1r342c2", | |
"name": "Sea trip", | |
"uri": "https://www.videvo.net/videvo_files/converted/2016_11/videos/GOPR6239_1.mov34724.mp4", | |
"nextVideoId": "c1r342c2" | |
} |
NewerOlder