Note
This no longer works in browser!
Note
This no longer works if you're alone in vc! Somebody else has to join you!
How to use this script:
- Accept the quest under User Settings -> Gift Inventory
version: '2' | |
services: | |
openldap: | |
image: osixia/openldap:1.2.3 | |
container_name: openldap | |
environment: | |
LDAP_LOG_LEVEL: "256" | |
LDAP_ORGANISATION: "Example Inc." | |
LDAP_DOMAIN: "example.org" | |
LDAP_BASE_DN: "" |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
// Remove all drafts from your drafts view | |
// Navigate to drafts | |
// F12 to raise dev console | |
// Paste the below | |
(async function(x) { | |
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) { | |
e.click(); | |
await new Promise(resolve => setTimeout(resolve, 500)) | |
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click(); | |
await new Promise(resolve => setTimeout(resolve, 1500)) |
-- A method for storing and retrieving hierarchical data in sqlite3 | |
-- by using a trigger and a temporary table. | |
-- I needed this but had trouble finding information on it. | |
-- This is for sqlite3, it mostly won't work on anything else, however | |
-- most databases have better ways to do this anyway. | |
PRAGMA recursive_triggers = TRUE; -- This is not possible before 3.6.18 | |
-- When creating the Node table either use a primary key or some other |
export const LazyScrollView = forwardRef(function LazyScrollView( | |
props: LazyScrollViewProps, | |
ref: ForwardedRef<FlashList<unknown[]>>, | |
): JSX.Element { | |
const {children, estimatedScrollViewSize, estimatedItemSize} = | |
props; | |
const data = isArray(children) ? children : Children.toArray(children); | |
// No specific reason for 2000, just a big number. Roughly 2x the screen size |
# .zshrc 中 p9k 的配置内容 | |
##################################### | |
# P9k 配色方案: bright、 light、dark(模式下右侧提示符不显示) | |
POWERLEVEL9K_COLOR_SCHEME='light' | |
# 在新提示符之前插入一行以保持间距 | |
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | |
# https://github.com/bhilburn/powerlevel9k/tree/next#customizing-prompt-segments | |
# LEFT_PROMPT 左侧提示符 |
std::string get_module_path(void* address) | |
{ | |
char path[FILENAME_MAX]; | |
HMODULE hm = NULL; | |
if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | | |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, | |
(LPCSTR)address, | |
&hm)) | |
{ |