This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Globals | |
DesktopCount = 3 ; Windows starts with 2 desktops at boot | |
CurrentDesktop = 1 ; Desktop count is 1-indexed (Microsoft numbers them this way) | |
; | |
; This function examines the registry to build an accurate list of the current virtual desktops and which one we're currently on. | |
; Current desktop UUID appears to be in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\VirtualDesktops | |
; List of desktops appears to be in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops | |
; | |
mapDesktopsFromRegistry() { | |
global CurrentDesktop, DesktopCount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Workaround for vim-vixen issue | |
* https://github.com/ueokande/vim-vixen/issues/1424 | |
*/ | |
.vimvixen-console-frame { | |
height: 0px; | |
color-scheme: light !important; | |
} | |
/* i really want this to be global */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AnotherComponent = defineComponent( | |
() => { | |
const text = atom(''); | |
return { text } | |
}, | |
() => ( | |
<input /> | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Demo() { | |
const loginForm = useForm({ | |
email: ['', [Validators.required]], | |
username: ['', [Validators.required, AsyncUsernameUniquenessValidator]], | |
password: ['', [PasswordStringValidator]], | |
contacts: [[], [Validators.minLength(1)], | |
); | |
const onLogin = useCallback((values) => { | |
console.log("=== form values", values); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const products = state([{name: 'ABC', authorID: 1}]); | |
const users = state([{ID: 1, name: 'Tom'}]); | |
const productWithUsers = computed(() => products.value.map(p => { | |
const user = users.find(u => u.ID === p.authorID); | |
return {...p, author: user}; | |
}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ComponentType } from "react"; | |
type GetProps<C> = C extends ComponentType<infer P> ? P : never; | |
type Matching<InjectedProps, DecorationTargetProps> = { | |
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps | |
? InjectedProps[P] extends DecorationTargetProps[P] | |
? DecorationTargetProps[P] | |
: InjectedProps[P] | |
: DecorationTargetProps[P]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Counter() { | |
const { data: { count }, fire } = useReim(counter); | |
return ( | |
<div> | |
<button onClick={() => fire(Increment)}>-</button> | |
<input value={count} /> | |
<button onClick={() => fire(Decrement)}>-</button> | |
</div> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am inizio on github. | |
* I am newman_oursky (https://keybase.io/newman_oursky) on keybase. | |
* I have a public key whose fingerprint is 3360 6C47 9B14 ECFE 6081 3E72 A90C 9856 22FD 8990 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12 as builder | |
WORKDIR /usr/src/app | |
COPY package.json package-lock.json ./ | |
RUN npm ci | |
COPY . . | |
RUN npm run build | |
FROM nginx:1.12-alpine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default () => { | |
return { | |
mount: async el => { | |
const App = await await import('./App') | |
const Wrapper = C => { | |
let setter | |
return () => { | |
const [state, setState] = useState() | |
setter = setState |
NewerOlder