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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> | |
<key>AppleSmoothFixedFontsSizeThreshold</key> | |
<integer>1</integer> |
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
activate application "SystemUIServer" | |
set deviceName to "Pavels's BeatsX" | |
tell application "System Events" | |
tell process "SystemUIServer" | |
set bluetoothMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth") | |
tell bluetoothMenu | |
click | |
set deviceMenuItem to (menu item deviceName of menu 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
const path = require('path') | |
exports.onCreateWebpackConfig = ({ actions, getConfig }) => { | |
actions.setWebpackConfig({ | |
resolve: { | |
modules: [path.resolve(__dirname, 'src')], | |
}, | |
}) | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<style> |
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
export type Action<P, T = string> = { type: T; payload: P | undefined } | |
export function createAction<T, P = any>(type: T) { | |
const actionCreator = (payload: P | undefined): Action<P, T> => ({ type, payload }) | |
actionCreator.type = type | |
return actionCreator | |
} |
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 { createPortal } from 'react-dom' | |
import { fetchAndPlay, playVideo } from 'utils/video' | |
import throttle from 'lodash/throttle' | |
import PlayBG from 'views/NewApp/components/PlayBG' | |
import styles from './BGVideo.css' | |
class BGVideo extends Component { | |
componentDidMount() { | |
this.loadBackground() |
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 { PUBLIC_NEXT_API_URL } = process.env; | |
let citiesRequest; | |
export function fetchCities() { | |
if (!citiesRequest) { | |
citiesRequest = fetch(`${PUBLIC_NEXT_API_URL}/cities`); | |
} | |
return citiesRequest; |
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 path = require("path"); | |
const crypto = require("crypto"); | |
const fs = require("fs/promises"); | |
const fetch = require("isomorphic-unfetch"); | |
const { API_URL, CACHE_DIR } = process.env; | |
const RESOUCES = ["/posts", "/albums"]; | |
function getFilename(str) { | |
const hash = crypto.createHash("sha1").update(str).digest("hex"); |
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 http = require("http"); | |
const path = require("path"); | |
const crypto = require("crypto"); | |
const fs = require("fs/promises"); | |
const { HOST, PORT, CACHE_DIR } = process.env; | |
function getFilename(str) { | |
const hash = crypto.createHash("sha1").update(str).digest("hex"); |
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 http = require("http"); | |
const fetch = require("isomorphic-unfetch"); | |
const { API_URL, PORT, HOST } = process.env; | |
const map = new Map(); | |
async function handler(req, res) { | |
if (map.has(req.url)) { | |
const data = await map.get(req.url); |
OlderNewer