Skip to content

Instantly share code, notes, and snippets.

View decrn's full-sized avatar
🐓

Denis Carnier decrn

🐓
  • KU Leuven
  • Belgium
View GitHub Profile
@tuur29
tuur29 / 0-scrape-slack.md
Last active October 23, 2019 17:10
Scrape slack search results

Scrape slack search results

Usage:

  • Search for from:NAME in Slack
  • Select some filters etc... (perhaps make sure sorting is on most recent?)
  • Paste this script into the dev tools and run in
  • Wait for the output to finish
  • Once you hit the 100th page you need to filter by ending date and re-run the script
  • Now concatenate these outputs together manually and run the following shell script to get you word count: https://gist.github.com/decrn/8f6454f514f481b5f5bd9df33e4e221e
@romainl
romainl / vanilla-linter.md
Last active May 6, 2024 01:48
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

@csswizardry
csswizardry / README.md
Last active June 16, 2024 13:44
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active July 4, 2024 07:31
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.