- Create
UNLOGGED
table. This reduces the amount of data written to persistent storage by up to 2x. - Set
WITH (autovacuum_enabled=false)
on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we neverDELETE
orUPDATE
the table). - Insert rows with
COPY FROM STDIN
. This is the fastest possible approach to insert rows into table. - Minimize the number of indexes in the table, since they slow down inserts. Usually an index
on
time timestamp with time zone
is enough. - Add
synchronous_commit = off
topostgresql.conf
. - Use table inheritance for fast removal of old data:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DONT FORGET TO `yarn add esbuild-loader` !!! | |
// config/webpacker/environment.js | |
const { environment } = require('@rails/webpacker') | |
const { ESBuildPlugin } = require('esbuild-loader') | |
const esBuildUse = [ | |
{ | |
loader: require.resolve('esbuild-loader'), | |
// What you want to compile to, in this case, ES7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*@0-180.com | |
*@0-420.com | |
*@0-900.com | |
*@0-aa.com | |
*@0-mail.com | |
*@0-z.xyz | |
*@00-mail.com | |
*@000476.com | |
*@000invaliddomain.local | |
*@001.igg.biz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trix-toolbar .button_group button::before { | |
background-image: none !important; | |
font-family: 'FontAwesome'; | |
font-size: 12px; | |
line-height: 28px; | |
} | |
trix-toolbar .button_group button.bold:before { | |
content: '\f032'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Things Nick Hates | |
0) Ann Kitchen | |
1) non-shallow tests | |
2) `if !` | |
3) ants | |
4) rock stars | |
5) sunlight off porch windows when drinking coffee | |
6) people who feed the meter | |
7) using floats for money |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
File.open("your_file.md", 'r') do |f| | |
f.each_line do |line| | |
forbidden_words = ['Table of contents', 'define', 'pragma'] | |
next if !line.start_with?("#") || forbidden_words.any? { |w| line =~ /#{w}/ } | |
title = line.gsub("#", "").strip | |
href = title.gsub(" ", "-").downcase | |
puts " " * (line.count("#")-1) + "* [#{title}](\##{href})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
// Used by dateinput | |
$.expr = {':': {}}; | |
// Used by bootstrap | |
$.support = {}; | |
// Used by dateinput | |
$.fn.clone = function(){ | |
var ret = $(); |