Skip to content

Instantly share code, notes, and snippets.

View funwarioisii's full-sized avatar

Kazuyuki Hashimoto funwarioisii

View GitHub Profile
@itkrt2y
itkrt2y / association.rb
Last active May 3, 2024 21:16
Association dataloader with graphql-ruby
# official docs: https://graphql-ruby.org/dataloader/sources.html
# app/graphql/sources/association.rb
class Sources::Association < ::GraphQL::Dataloader::Source
def initialize(association_name, scope = nil)
@association_name = association_name
@scope = scope
end
def fetch(records)

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@jmvrbanac
jmvrbanac / app.py
Created February 18, 2016 01:05
Using Jinja2 with Falcon
import os
import falcon
import jinja2
def load_template(name):
path = os.path.join('templates', name)
with open(os.path.abspath(path), 'r') as fp:
return jinja2.Template(fp.read())
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.