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
#!/bin/bash | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
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
var gmtOffset = - new Date().getTimezoneOffset() / 60; | |
if (gmtOffset >= -11 && gmtOffset <= -6) { | |
window.location.href='#'; | |
} else if (gmtOffset <= -4) { | |
window.location.href='#'; | |
} else { | |
window.location.href='#'; | |
} |
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 createCloudinary = (cloudName, unsignedUploadPreset) => ({ | |
process: (fieldName, file, metadata, load, error, progress, abort) => { | |
// `fieldName` and `meta` are not used for now | |
const url = `https://api.cloudinary.com/v1_1/${cloudName}/upload`; | |
const xhr = new XMLHttpRequest(); | |
const formData = new FormData(); |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.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
import Reconciler from 'react-reconciler' | |
import omit from 'lodash/omit' | |
import capitalize from 'lodash/capitalize' | |
import { actions as elementActions } from './store/elements' | |
import * as Elements from './elements' | |
const roots = new Map() | |
const emptyObject = {} | |
const Renderer = Reconciler({ |
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
handleDrop = files => { | |
// Push all the axios request promise into a single array | |
const uploaders = files.map(file => { | |
// Initial FormData | |
const formData = new FormData(); | |
formData.append("file", file); | |
formData.append("tags", `codeinfuse, medium, gist`); | |
formData.append("upload_preset", "pvhilzh7"); // Replace the preset name with your own | |
formData.append("api_key", "1234567"); // Replace API key with your own Cloudinary key | |
formData.append("timestamp", (Date.now() / 1000) | 0); |
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
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} from 'react-native'; |
- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
NewerOlder