This file contains hidden or 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
// setup | |
const data = { | |
labels: [ | |
'Improved Screening (15%)', | |
'Reduced Dependence (20%)', | |
'Efficient Decisions (15%)', | |
'Proactive Prevention (30%)', | |
'Other (Remaining Savings)', | |
], | |
datasets: [ |
This file contains hidden or 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 interface TaxRecord { | |
alpha2_code: string | |
mask: string | |
desc: string | |
example: string | |
} | |
export const TaxIdentifiers: TaxRecord[] = [ | |
{ | |
alpha2_code: 'AT', |
This file contains hidden or 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
interface Alpha3Country { | |
a2_code: string | |
a3_code: string | |
label: string | |
phone: string | |
} | |
const Countries: Alpha3Country[] = [ | |
{ | |
label: 'Andorra', |
This file contains hidden or 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
#!/bin/bash | |
# Will be set to 1 by the SIGINT ignoring/postponing handler | |
declare -ig SIGINT_RECEIVED=0 | |
# On <CTRL>+C or "kill -s SIGINT $$" set flag for later examination | |
function _set_SIGINT_RECEIVED { | |
SIGINT_RECEIVED=1 | |
} | |
# Set to 1 if you want to keep bash running after handling SIGINT in a particular way |
This file contains hidden or 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
# JWT токен не работает в SSR приложениях по типу NextJS/Sveltekit которые не могут передать на сторону сервера заголовки. | |
# Варианта два, передавать токен в кукисах или отказаться от токена. Это второй вариант решения | |
from rest_framework.decorators import api_view, authentication_classes | |
from rest_framework.response import Response | |
from rest_framework import status | |
from drf_yasg.utils import swagger_auto_schema | |
from drf_yasg import openapi | |
from django.contrib.auth import login | |
from ..serializers.Registration import RegistrationSerializer |
This file contains hidden or 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 mapCyrillic = { | |
KeyQ: 'й', | |
KeyW: 'ц', | |
KeyE: 'у', | |
KeyR: 'к', | |
KeyT: 'е', | |
KeyY: 'н', | |
KeyU: 'г', | |
KeyI: 'ш', | |
KeyO: 'щ', |
This file contains hidden or 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
<template> | |
<div> | |
<v-text-field | |
:ref="`input-mask-${identifier}`" | |
v-model="inputPhone" | |
outlined | |
dense | |
label="Номер телефона" | |
hide-details | |
@keydown="input" |
This file contains hidden or 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 class PhoneField { | |
constructor( | |
handler, | |
code = '+7', | |
mask = '(___)___-__-__', | |
placeholder = '_' | |
) { | |
this.handler = handler; | |
this.mask = code + mask; | |
this.code = code; |
This file contains hidden or 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
for WID in $(xwininfo -root -tree | sed '/"Plasma": ("plasmashell" "plasmashell")/!d; s/^ *\([^ ]*\) .*/\1/g'); do | |
xprop -id $WID -remove _KDE_NET_WM_SHADOW | |
done |
This file contains hidden or 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
#!/bin/bash | |
# AMD + FFMPEG VAAPI screen+alsa+pulseaudio recording script | |
# In your home directory create .asoundrc with following contents: | |
# pcm.!default pulse | |
# ctl.!default pulse | |
# This allows alsa to use pulseaudio as the input device. | |
# Bind any hotkey to the script. | |
# Launch once - recording starts. Launch twice - recording stops. |
NewerOlder