Skip to content

Instantly share code, notes, and snippets.

View onmotion's full-sized avatar
:octocat:

Alexandr Kozhevnikov onmotion

:octocat:
View GitHub Profile
@onmotion
onmotion / acme-wildcard-snippet.sh
Created April 8, 2019 07:05
acme wildcard issue snippet
#!/bin/bash
acme.sh --issue -d domain.ru -d '*.domain.ru' --dns dns_cloudns --staging --debug 2
@onmotion
onmotion / slot-passing.vue
Last active May 27, 2019 11:48
Vue js pass slot to child component wrapper through template
<!-- pass scoped slots -->
<!-- bind props as a Object for reactively binding props which contains getter and setter -->
<template v-for="(_, name) in $scopedSlots" v-slot:[name]="slotData">
<slot :name="name" v-bind="{props: slotData}" />
</template>
<!-- pass slots -->
<template v-for="(_, name) in $slots" :slot="name">
<slot :name="name"/>
</template>
@onmotion
onmotion / install-git-completion.sh
Last active June 27, 2019 10:10 — forked from johngibb/install-git-completion.sh
Mac OS X - Install Git Completion
URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion..."
if ! curl "$URL" -Ls -o "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@onmotion
onmotion / CssTextField.js
Last active June 7, 2022 12:14
MUI TS styled component add props
export const CssTextField = styled(TextField, {
shouldForwardProp: (prop) => prop !== "resize",
})<{ resize?: boolean }>(({ theme, resize }) => {
console.log({ resize });
return {
root: {
"& label.Mui-focused": {
color: theme.palette.primary.light,
},
@onmotion
onmotion / bash.sh
Created January 30, 2024 12:41
Android emulator React Native port forwarding (to debug disabled network with Metro)
adb root
adb reverse tcp:8081 tcp:8081
adb shell setprop metro.host "localhost"