Skip to content

Instantly share code, notes, and snippets.

View bkeating's full-sized avatar
🤙
Gettin’ SUM & CALCin’ out

Benjamin Keating bkeating

🤙
Gettin’ SUM & CALCin’ out
View GitHub Profile
atom-text-editor {
-webkit-font-smoothing: antialiased;
}
atom-text-editor::shadow{
.storage.type.function.arrow, .operator {
font-family: 'FiraCode-Retina';
text-rendering: optimizeLegibility;
vertical-align: baseline;
}
@garmjs
garmjs / server.js
Last active July 29, 2022 17:16
Simple SSR React, React Router v4 and Helmet with express
require('babel-register')
const express = require('express')
const React = require('react')
const ReactDOMServer = require('react-dom/server')
const ReactRouter = require('react-router')
const ServerRouter = ReactRouter.ServerRouter
const App = require('./src/App').default
const path = require('path')
const Helmet = require('react-helmet')
const compression = require('compression')
@LowerDeez
LowerDeez / admin.py
Last active February 17, 2023 05:15
Django. Admin Tabular Inline initial data
from django.utils.functional import curry
class DetailsInline(admin.TabularInline):
model = Details
# formset = DetailsFormset
extra = 3
def get_formset(self, request, obj=None, **kwargs):
initial = []
if request.method == "GET":
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@nijicha
nijicha / install_nodejs_and_yarn_homebrew.md
Last active February 24, 2025 17:32
Install NVM, Node.js, Yarn via Homebrew
@jgreat
jgreat / docker.md
Last active January 13, 2020 16:45
Docker CE on RHEL 7.6

Install Prerequisite Packages

yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

Enable yum server-extras Repo

@drodsou
drodsou / preact-htm-nobuild.html
Last active February 15, 2021 05:19
Preact-htm single page no build example
<!DOCTYPE html>
<html lang="en">
<title>htm Demo</title>
<body>
<h1>no build preact htm app here:</h1>
<div id="app"></div>
</body>
<script type="module">
// -- no build example of preact + htm, useful for small proof of concept