It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.
// Source: https://community.adobe.com/t5/after-effects-discussions/convert-ae-keyframes-info-to-cubicbezier-points/m-p/6139286#M135604 | |
// Usage: select a layer, then File -> Scripts -> Run Script File... -> select this script | |
var curItem = app.project.activeItem; | |
var selectedLayers = curItem.selectedLayers; | |
var selectedProperties = curItem.selectedProperties; | |
var output=""; | |
if (selectedLayers == 0) { | |
output="Please Select at least one Layer"; |
// Source: https://community.adobe.com/t5/after-effects-discussions/convert-ae-keyframes-info-to-cubicbezier-points/m-p/6139286#M135604 | |
// Usage: select a layer, then File -> Scripts -> Run Script File... -> select this script | |
var curItem = app.project.activeItem; | |
var selectedLayers = curItem.selectedLayers; | |
var selectedProperties = curItem.selectedProperties; | |
var output=""; | |
if (selectedLayers == 0) { | |
output="Please Select at least one Layer"; |
(function getSelectedLayerType() { | |
/** | |
* Gets the type of a given layer | |
* | |
* @param {Layer} layer Layer to check | |
* @return {string} Layer type | |
*/ | |
function getLayerType(layer) { | |
switch (layer.matchName) { | |
case "ADBE Vector Layer": |
// jonschlinkert/is-object | |
type IsObjectObject<T> = T extends | |
| AnyArray | |
| AnyFunction | |
| boolean | |
| null | |
| number | |
| string | |
| symbol | |
| undefined |
# %% | |
import replicate | |
model = replicate.models.get("prompthero/openjourney") | |
version = model.versions.get("9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb") | |
PROMPT = "mdjrny-v4 style 360 degree equirectangular panorama photograph, Alps, giant mountains, meadows, rivers, rolling hills, trending on artstation, cinematic composition, beautiful lighting, hyper detailed, 8 k, photo, photography" | |
output = version.predict(prompt=PROMPT, width=1024, height=512) | |
# %% | |
# download the iamge from the url at output[0] | |
import requests |
#!/bin/bash | |
hash git 2>/dev/null || { echo >&2 "Required command 'git' is not installed. ( hmm... why are you using this? ) Aborting."; exit 1; } | |
hash realpath 2>/dev/null || { echo >&2 "Required command 'realpath' is not installed. Aborting."; exit 1; } | |
hash pwd 2>/dev/null || { echo >&2 "Required command 'pwd' is not installed. Aborting."; exit 1; } | |
hash cd 2>/dev/null || { echo >&2 "Required command 'cd' is not installed. Aborting."; exit 1; } | |
hash echo 2>/dev/null || { echo >&2 "Required command 'echo' is not installed. Aborting."; exit 1; } | |
hash mv 2>/dev/null || { echo >&2 "Required command 'mv' is not installed. Aborting."; exit 1; } | |
hash diff 2>/dev/null || { echo >&2 "Required command 'diff' is not installed. Aborting."; exit 1; } | |
hash diffstat 2>/dev/null || { echo >&2 "Required command 'diffstat' is not installed. Aborting."; exit 1; } |
// Cannot re-export a type when the '--isolatedModules' flag is provided.ts(1205) | |
export { IMyInterface } from "./types" | |
// this works! | |
import { IMyInterface as IMyInterfaceForExport } from "./types" | |
export type IMyInterface = IMyInterfaceForExport; | |
// And Also: | |
export type IMyInterface2 = import("./types").IMyInterface; |
The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork
from the parent process and attach to the child in a second lldb instance. Otherwise, read on.
Don't make the mistake of thinking you can just brew install gdb
. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069
$ xcode-select install # install the XCode command-line tools
/** | |
* Educational Stack-based VM. | |
* | |
* See also: | |
* - More complex example with recursion: https://gist.github.com/DmitrySoshnikov/afda459222e96e6002ac | |
* - Register-based VM example: https://gist.github.com/DmitrySoshnikov/6407781 | |
* | |
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
* http://dmitrysoshnikov.com | |
* MIT Stye License (C) 2015 |