Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
@jrk
jrk / Makefile
Created February 9, 2018 20:10
Trivial PyBind11 test module
PYBIND11_INCLUDE ?= # -Ipath/to/pybind/include if not in other paths
PREFIX ?= $(shell python3-config --prefix)
INCLUDES = ${PYBIND11_INCLUDE} -I${PREFIX}/include/python3.6m -I${PREFIX}/include
CFLAGS = -std=c++11 ${INCLUDES}
LDFLAGS = -arch x86_64 -L${PREFIX}/lib -lpython3.6m -ldl
foobar.so: foobar.cpp
@jrk
jrk / dbshare2.py
Created April 16, 2020 16:32
Simple script to upload files to Dropbox and generate a URL for embedding elsewhere
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# via: https://github.com/macedotavares/Glass-Dome
import sys, os, requests, json, time
file_path = sys.argv[1]
db_token = sys.argv[2]
db_folder = sys.argv[3]
@jrk
jrk / 55-bytes-of-css.md
Created September 26, 2022 06:27 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}