https://facebook.com/sharer/sharer.php?u=URL
https://twitter.com/intent/tweet/?url=URL&text=CONTENT
| const methods = [ | |
| Math.random, | |
| n => (Math.sin(n * 0.04) + 1) * 0.5, | |
| n => n % 200 / 200, | |
| n => Math.pow(n * 0.5 % 100 - 50, 2) / 2500, | |
| n => (Math.sin(n * 0.01) + 1) * 0.3 + 0.15, | |
| n => n % -50 / 50, | |
| n => Math.abs(n * 0.8 % 100 - 50) / 50, | |
| ] |
| import fs from 'fs' | |
| /** | |
| * @example | |
| * // In rollup.config.js | |
| * export default { | |
| * // ... | |
| * plugins: [ | |
| * webDependencies({ | |
| * // Use pika cdn by default |
https://stackoverflow.com/a/3926546/4867982
| Lookaround | Name | What it Does |
|---|---|---|
(?=foo) |
Lookahead | Asserts that what immediately follows the current position in the string is foo |
(?<=foo) |
Lookbehind | Asserts that what immediately precedes the current position in the string is foo |
(?!foo) |
Negative Lookahead | Asserts that what immediately follows the current position in the string is not foo |
| `(? |
| export function computeVolume(geometry) { | |
| return isBufferGeometry(geometry) | |
| ? computeBufferGeometryVolume(geometry) | |
| : computeGeometryVolume(geometry) | |
| } | |
| export function computeBufferGeometryVolume(geometry) { | |
| return geometry.index | |
| ? computeIndexedBufferGeometryVolume(geometry) | |
| : computeNotIndexedBufferGeometryVolume(geometry) |
| import { Vector2, Path } from 'three' | |
| export function arcEdgedPath( | |
| path: Path, | |
| points: Vector2[], | |
| radius: number, | |
| close?: boolean | |
| ): void | |
| export function arcEdgedPath( |
| // Factorielle de n | |
| const f = n => n === 0 ? 1 : n * f(n - 1) | |
| // Coefficient binomial (nombre de parties de k éléments dans un ensemble de n éléments) | |
| const c = (n, k) => f(n) / (f(k) * f(n - k)) | |
| function bezier(t, points) { | |
| const n = points.length - 1 | |
| const o = 1 - t |
| # https://twitter.com/fabiogiolito/status/933339627859185664 | |
| sudo rm -rf /.DocumentRevisions-V100/ | |
| rm -rf ~/Library/Developer/Xcode/DerivedData | |
| rm -rf ~/Library/Developer/Xcode/Archives | |
| rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport | |
| rm -rf ~/Library/Developer/Xcode/watchOS\ DeviceSupport | |
| rm -rf ~/Library/Developer/Xcode/tvOS\ DeviceSupport | |
| rm -rf ~/Library/Caches/com.apple.dt.Xcode | |
| xcrun simctl delete unavailable |