Skip to content

Instantly share code, notes, and snippets.

View qwexvf's full-sized avatar

Marcelo Higa qwexvf

  • Tokyo, Japan
  • 00:36 (UTC +09:00)
View GitHub Profile
@woylie
woylie / absinthe_enums_from_ecto_enums.ex
Last active November 14, 2024 16:19
Absinthe enums from Ecto enums
@doc """
Takes a list of Ecto.Enum fields and converts them into Absinthe enum
types.
## Usage
The list consists of tuples with the name of the GraphQL enum, the Ecto schema
module and the schema field using `Ecto.Enum`.
use Absinthe.Schema.Notation
@Krever
Krever / _README.md
Last active February 5, 2025 16:33
Yabai setup for i3wm users
@bbqtd
bbqtd / macos-tmux-256color.md
Last active February 22, 2025 07:38
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

import https from 'https'
export default function({ $axios }) {
const agent = new https.Agent({
rejectUnauthorized: false
})
$axios.onRequest(config => {
if (process.env.dev) {
config.httpsAgent = agent
}
@dohomi
dohomi / component.vue
Last active February 23, 2021 10:16
combine Nuxt asyncData with vue-apollo and watchQuery for client search
<script>
import allTravelsGql from '../../GQL/travel/allTravels.gql'
import {pagination, getSkipFirst} from '../../../generated-cms/util/pagination'
import {getTravelQuery, setCategoryOnQuery} from '../../util/getTravelQuery'
const buildQuery = variables => {
return {
query: allTravelsGql,
variables,
manual: true,
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@voluntas
voluntas / shiguredo_product.rst
Last active May 21, 2024 13:17
時雨堂自社製品コトハジメ
# thanks Eli! https://github.com/seemethere
import os
import asyncio
import uvloop
from asyncpg import connect, create_pool
from sanic import Sanic
from sanic.response import json
# An example of using SQLAlchemy / PSQL for PubSub with asyncio
# Rather than using `select.select` to watch for messages, we use
# `loop.add_reader`.
# Inspired by: https://gist.github.com/dtheodor/3862093af36a1aeb8104
#
# One example of use is with aiopyramid.
#
# For an additional consideration, read about case folding here:
# http://stackoverflow.com/a/5173993/465164