Skip to content

Instantly share code, notes, and snippets.

View humphreybc's full-sized avatar

Benjamin Humphrey humphreybc

View GitHub Profile
@humphreybc
humphreybc / droppable.tsx
Last active October 13, 2023 13:54
Dovetail NoteGroup component
import * as csx from "csx";
import { types } from "dovetail/graphql";
import { NoteGroupColor } from "dovetail/types";
import { NoteSortDropdownChoice } from "dovetail/ui/dropdown/NoteSortDropdown";
import { OutsideClick } from "dovetail/ui/layout/OutsideClick";
import { NewNoteItem } from "dovetail/ui/note";
import { CreateNoteItem } from "dovetail/ui/note/CreateNoteItem";
import { Cache } from "dovetail/ui/util/Cache";
import { makeStyleSafe } from "dovetail/util/reactBeautifulDnd";
import * as text from "dovetail/util/text";
@humphreybc
humphreybc / configuration.js
Last active June 13, 2018 20:08
Webpack 3 configuration for Dovetail
// Common configuration for webpacker loaded from config/webpack/paths.yml
const { join, resolve } = require("path");
const { env } = require("process");
const { safeLoad } = require("js-yaml");
const { readFileSync } = require("fs");
const configPath = resolve("config", "webpack");
const loadersDir = join(__dirname, "loaders");
const paths = safeLoad(readFileSync(join(configPath, "paths.yml"), "utf8"))[env.NODE_ENV];
@humphreybc
humphreybc / free_email_providers.conf
Last active January 20, 2021 06:42
List of free email providers
0-mail.com
027168.com
0815.su
0sg.net
10mail.org
10minutemail.co.za
11mail.com
123.com
123box.net
123india.com
!!! XML
!!!
%html{ lang: 'en' }
%head
= javascript_include_tag 'website', defer: 'defer'
class PagesController < ApplicationController
layout 'website'
end
body {
font-family: font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
= inline_css 'website.css'
module AssetsHelper
def inline_file(path)
if assets = Rails.application.assets
asset = assets.find_asset(path)
return '' unless asset
asset.source
else
File.read(File.join(Rails.root, 'public', asset_path(path)))
end
end
config.public_file_server.headers = {
'Cache-Control' => 'public, s-maxage=31536000, maxage=15552000',
'Expires' => "#{1.year.from_now.to_formatted_s(:rfc822)}"
}
var events = [];
window.track = events.push.bind(events);
document.addEventListener("DOMContentLoaded", function() {
window.track = function(name) {
mixpanel.track(name)
};
events.forEach(mixpanel.track);
});