- JSON is faster for small size data
- map (key size < 50 and Unmarshalling intensive workload)
- single struct
- gob is faster for big size data
- map (key size > 50 or Marshalling intensive workload)
- slice
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
# kubernetes - is an open source system for managing containerized | |
# applications across multiple hosts, providing basic mechanisms for | |
# deployment, maintenance, and scaling of applications. | |
# See: https://kubernetes.io | |
function __kubectl_no_command | |
set -l cmd (commandline -poc) | |
if not set -q cmd[2] | |
return 0 | |
end |
Matrix is:
an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.
It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix
, mac, win). See: http://matrix.org/docs/howtos/client-server.html
It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.
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
web: | |
build: . | |
volumes: | |
- .:/opt/myapp | |
ports: | |
- '3000:3000' | |
links: | |
- db | |
- redis | |
- selenium |
- 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
res = | |
with {:ok} <- validate_request(request), | |
{:ok, user} <- get_user(request), | |
{:ok} <- update_db(user), | |
{:ok} <- send_email(user) do | |
return_http_message | |
end | |
case res do | |
{:error, x} -> IO.inspect("Error: " <> x) |
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
#!/bin/sh | |
################################################################## | |
################################################################## | |
# | |
# The FreeBSD System Hardening Script | |
# David Childers - 15 February, 2010 | |
# | |
# This software is released under the Attribution-ShareAlike version 3.0 Licence. | |
# www.creativecommons.org/licenses/by-sa/3.0/ | |
# |
These are the Kickstarter Engineering and Data role definitions for both teams.
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 | |
require 'thor' | |
class SubCommandBase < Thor | |
def self.banner(command, namespace = nil, subcommand = false) | |
"#{basename} #{subcommand_prefix} #{command.usage}" | |
end | |
def self.subcommand_prefix |