$ ffmpeg -t 720 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero empty.mpeg
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
| const WebSocket = require('ws'); | |
| const ws = new WebSocket('wss://ws.kraken.com'); | |
| ws.on('open', function open() { | |
| ws.send(JSON.stringify({ | |
| "event": "subscribe", | |
| "pair": [ | |
| "BTC/USD", | |
| "ETH/USD", |
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
| const nodemailer = require('nodemailer'); | |
| sendMail('gmail', '[email protected]', 'Maxime', '[email protected]', 'Informations V2.0', 'Bonjour Maxime\nPasse une belle journée :p') | |
| .then((res) => { | |
| console.log('Email sent: ' + res.response) | |
| }) | |
| .catch((err) => { | |
| console.log(err); | |
| }); |
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
| import React from 'react' | |
| import { View, StyleSheet } from 'react-native' | |
| type Props = { | |
| behind: React.Component, | |
| front: React.Component, | |
| under: React.Component | |
| } | |
| // Show something on top of other |
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
| import axios from 'axios' | |
| import store from './redux/store' | |
| const AxiosInstance = axios.create() | |
| AxiosInstance.interceptors.response.use( | |
| (response) => { | |
| return response | |
| }, | |
| async function (error) { |
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
| const transformFirestoreTypes = (obj: any): any => { | |
| Object.keys(obj).forEach(key => { | |
| if (!obj[key]) return | |
| if (typeof obj[key] === 'object' && 'toDate' in obj[key]) { | |
| obj[key] = obj[key].toDate().getTime() | |
| } else if (obj[key].constructor.name === 'GeoPoint') { | |
| const { latitude, longitude } = obj[key] | |
| obj[key] = { latitude, longitude } | |
| } else if (obj[key].constructor.name === 'DocumentReference') { | |
| const { id, path } = obj[key] |
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
| import i18n from 'i18n-js'; | |
| import detectBrowserLanguage from 'detect-browser-language'; | |
| const en = { | |
| title: "Title" | |
| }; | |
| const fr = { | |
| title: "Title" | |
| }; |
From this repository : https://github.com/OpenCode/awesome-regex
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
| import React, { useState } from 'react' | |
| import { SingleDatePicker } from 'react-dates' | |
| import moment from 'moment' | |
| export function AppDayPicker({ value, onChange, ...props }) { | |
| const [date, setDate] = useState(null) | |
| const [focusedInput, setFocusedInput] = useState(null) | |
| const returnYears = () => { |