This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| // Ported from Stefan Gustavson's java implementation | |
| // http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
| // Read Stefan's excellent paper for details on how this code works. | |
| // | |
| // Sean McCullough banksean@gmail.com | |
| /** | |
| * You can pass in a random number generator object if you like. | |
| * It is assumed to have a random() method. | |
| */ |
| # 私が考える安全なプログラムを書くために必要なこと | |
| 今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
| - ファイルを開こうとしたらコマンドを実行できてしまったり | |
| - CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
| - SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
| こういったときに | |
| - 入力値検証をしないと危険になる |
| #import "NSObject+performSelector.h" | |
| @implementation NSObject (performSelector) | |
| - (void)call:(NSString *)sel { | |
| [self performSelector:@selector(sel)]; | |
| } | |
| - (id)get:(NSString *)sel { | |
| return [self performSelector:@selector(sel)]; |
| Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman); | |
| RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap); | |
| // option 1 h/t [Chris Banes](https://chris.banes.me/) | |
| circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth()); | |
| // option 2 h/t @csorgod in the comments | |
| circularBitmapDrawable.setCircular(true); |
| 日時: | 2021-01-29 |
|---|---|
| 作: | @voluntas |
| バージョン: | 2021.2 |
| url: | https://voluntas.github.io/ |
| import SwiftUI | |
| extension View { | |
| @MainActor | |
| func pdf(size: ProposedViewSize) -> Data { | |
| let renderer = ImageRenderer(content: self) | |
| renderer.proposedSize = size | |
| var pdfData = NSMutableData() | |
| renderer.render { size, render in | |
| var mediaBox = CGRect(origin: .zero, size: size) |