Skip to content

Instantly share code, notes, and snippets.

View webel's full-sized avatar
😌
कोई बात नही

Evita webel

😌
कोई बात नही
View GitHub Profile
@webel
webel / evie.asc
Last active February 24, 2022 16:15
Evita's PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFoBjT8BEAC9p+y096kmKThHgwqFa6rnAXmtIScnsblyKD80GtJInWovuaBe
tlu95EfadE6H+shPuNdA+i5rUL3s1S7GopHr2nclr51YjmNuvef9AHpFSRatLFwZ
AFArRCmnIs+WBMZ6c8LD+NdLSjnCTioGyJo7cX0ACj3Qy1H+mKKN+IHOksjZ4CIV
/99zP9d6folDekhIb7EhsxuhCod1MqE4Ckr1uI/3Fa6TrUo2rV7mpoSC8BTrikhU
v24D1Ug6/HTrXeUUPXrWwGP8j1siCNYbWAVOWcZ3jBzZsGrzE+wS7und0Y0kj192
ZhnLSNKXDr8F0pCdLAxzq+JTpSo6qDLFoWKZGmaIBsXr4qfbiYeMt6Nvd+aGmbJI
cxzdEoHS3mJO41Al2R4vp7RIXBwkhl5/+3sEXOuHbz1pm58GS9NpWCV/5XgWg34F
8pSCxTVibdn9yY46OSlK/SjogRGYr0HZlA5qsR563LzxGkR/UA7eDq5bHfW44GRM
/**
* Slate's schema has changed vastly under 2 years. The text editor is still
* a better candidate than the other OSS editors out there, so we must live
* with the major changes.
*
* Migrate a schema from the old version 0.33 to current version 0.6x
* Inspiration taken wholly from
* https://github.com/react-page/react-page/blob/b6c83a8650cfe9089e0c3eaf471ab58a0f7db761/packages/plugins/content/slate/src/migrations/v004.ts
*/
@webel
webel / README.md
Last active November 11, 2021 16:44
Get select_relatade and prefetch_related fields for queryset given a request

graphene-django-extras is great.

Here's a homegrown solution to getting the fields that can be selected and prefetched at the qs stage in FilterSet classes.

Simply inherit from it to automatically get the qs with any possible data selected/prefetched.

@webel
webel / README.md
Last active February 21, 2017 16:53
# Mac programmatically set input sources and dock mods

Mac programmatically set input sources and dock mods

This is not the way to go! Which I figured out after digging around and jotting down my findings. Maybe this'll come in handy for someone else, though. The last link in references describes "the way"

How do I run it?

I'll risk insulting your intelligence first thing, and just mention that this is for OS X only. Open the terminal and do the below to run the script:

> . {PATH-TO-SCRIPT}/set_defaults.sh