Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts@4.7.3/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts@4.7.3/access/Ownable.sol"; | |
import "@openzeppelin/contracts@4.7.3/utils/Counters.sol"; | |
contract MyToken is ERC721, Ownable { | |
using Counters for Counters.Counter; |
const express = require('express'); | |
const line = require('@line/bot-sdk'); | |
const request = require('request'); | |
const CHANNEL_ACCESS_TOKEN = 'YOUR_CHANNEL_ACCESS_TOKEN'; | |
const CHANNEL_SECRET = 'YOUR_CHANNEL_SECRET'; | |
const OPENAI_API_KEY = 'YOUR_OPENAI_API_KEY'; | |
// 建立 LINE Bot 物件 | |
const config = { |
<?php | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |
#!/usr/bin/env python3 | |
import math | |
# >> Discrete Fourier transform for sampled signals | |
# x [in]: sampled signals, a list of magnitudes (real numbers) | |
# yr [out]: real parts of the sinusoids | |
# yi [out]: imaginary parts of the sinusoids | |
def dft(x): | |
N, yr, yi = len(x), [], [] |
#!/usr/bin/env python | |
""" | |
Extract title from PDF file. | |
Depends on: pyPDF, PDFMiner. | |
Usage: | |
find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {} |
// Run from the dev tools console of any Youtube video | |
// Accurate as of October 28, 2016. Uses quality + video type for naming now, | |
// prevents video urls being overwritten. | |
// ES6 version | |
const videoUrls = ytplayer.config.args.url_encoded_fmt_stream_map | |
.split(',') | |
.map(item => item | |
.split('&') | |
.reduce((prev, curr) => (curr = curr.split('='), |
<?php | |
public function postBounceOrComplaint(Request $request, Mailer $mailer){ | |
Log::info($request->json()->all()); | |
if($request->json('Type') == 'SubscriptionConfirmation'){ | |
$client = new Client(); | |
$client->get($request->json('SubscribeURL')); | |
return response()->json(); |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.