Skip to content

Instantly share code, notes, and snippets.

View willisplummer's full-sized avatar
🏄‍♂️
/shrug

willis plummer willisplummer

🏄‍♂️
/shrug
View GitHub Profile
#! /usr/bin/env bash
set -eufo pipefail
nix-shell --pure --run 'ghcide --lsp'
@jevakallio
jevakallio / List.jsx
Last active April 17, 2019 02:46
Apollo/Fraql fragments. just an example, not syntactically correct
import gql from 'fraql'
import { ListRow } from './ListRow';
// this is the whole list
export const List = ({ users }) => (
<ul>
{users.map(user => <ListRow user={user} />)}
</ul>
)
{
services.nginx = {
enable = true;
appendHttpConfig = ''
types {
text/html html;
text/css css;
text/xml xml rss;
image/gif gif;
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;