sudo yum -y install epel-release
sudo yum -y update
Download repository
| public PagedData findUsersByActivationStatusWithPaging(UserActivationStatus activationStatus, String pagingState) { | |
| logger.info("Finding users by activation status {}...", activationStatus); | |
| Select select = QueryBuilder | |
| .select() | |
| .from("user"); | |
| select.where(eq("activationStatus", activationStatus.name())); | |
| select.setFetchSize(pagingFetchSize); | |
| if (pagingState != null) { | |
| select.setPagingState(PagingState.fromString(pagingState)); |
| #!/usr/bin/env bash | |
| # Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few | |
| # other common libraries | |
| # binary will be at ~/bin/ffmpeg | |
| sudo apt update && sudo apt upgrade -y | |
| mkdir -p ~/ffmpeg_sources ~/bin | |
| export PATH="$HOME/bin:$PATH" |
| func fetchContentLength(for url: URL, completionHandler: @escaping (_ contentLength: UInt64?) -> ()) { | |
| var request = URLRequest(url: url) | |
| request.httpMethod = "HEAD" | |
| let task = URLSession.shared.dataTask(with: request) { (data, response, error) in | |
| guard error == nil, | |
| let response = response as? HTTPURLResponse, | |
| let contentLength = response.allHeaderFields["Content-Length"] as? String else { | |
| completionHandler(nil) |
| """Server-side I/O Performance in Python | |
| Based on the article and discussion at: | |
| https://www.toptal.com/back-end/server-side-io-performance-node-php-java-go | |
| The code was posted at: | |
| https://peabody.io/post/server-env-benchmarks/ |
| ### | |
| # HAProxy configuration for Eventmq Web-node. | |
| # Configured to serve: | |
| # - 100k websocket connections | |
| # - 2k (2% of WS) streaming connections (5k fullconn) | |
| # - 100 (0.1% of WS) xhr connections (5k fullconn) | |
| ### | |
| global | |
| log 127.0.0.1 local2 info |
This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.
import 'firebase';| const Koa = require('koa'); | |
| const app = new Koa(); | |
| app.use(ctx => { | |
| ctx.body = 'Hello World'; | |
| }); | |
| var listener = app.listen(process.env.PORT || 3000, () => { | |
| console.log(`Listening on port ${listener.address().port}`); | |
| }); |
| processor : 0 | |
| vendor_id : GenuineIntel | |
| cpu family : 6 | |
| model : 61 | |
| model name : Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz | |
| stepping : 4 | |
| microcode : 0x23 | |
| cpu MHz : 2457.468 | |
| cache size : 3072 KB |
Brought to you by Headjack
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.
Let's start with some basics:
ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file