gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby
and close and reopen your terminal.
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby
and close and reopen your terminal.
yarn add http-proxy-middleware express
node proxy.js
from django.contrib.postgres.forms import SimpleArrayField, ValidationError, prefix_validation_error | |
class ArrayField(SimpleArrayField): | |
def prepare_value(self, value): | |
return [self.base_field.prepare_value(v) for v in value] | |
def to_python(self, value): | |
# see django/contrib/postgres/forms/array.py:37 | |
if value: | |
items = value |
[alias] | |
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative | |
glg = !git lg --graph | |
tree = log --graph --decorate --pretty=oneline --abbrev-commit | |
tr = !LESS="-RFX" git tree | |
unstage = reset HEAD | |
last = log -1 HEAD | |
visual = !gitk | |
st = status | |
uncommit = reset --soft HEAD^ |
class ResponseError(Exception): | |
def __init__(self, message, code=None, params=None): | |
super().__init__(message) | |
self.message = str(message) | |
self.code = code | |
self.params = params |
@classmethod | |
def mutate_and_get_payload(cls, input, context, info): | |
user = context.user | |
old_password = input.get('old_password') | |
new_password = input.get('new_password') | |
if user.has_usable_password(): | |
if not user.check_password(old_password): | |
raise ResponseError( | |
"Invalid Password", |
import jMoment from 'moment-jalaali' | |
import { toPersian } from './toPersian' | |
export default class jalaaliUtils { | |
static toJMoment (date) { | |
return jMoment(date ? date.clone() : undefined) | |
} | |
static parse (value, format) { | |
return jMoment(value, format) |
type ComponentProps<C> = C extends React.ComponentType<infer P> ? P : any; |