- musée mechanique
- if you're in the financial district, check out the old pacific stock exchange (pre-hipster fixie movie Quicksilver with Kevin Bacon was filmed here!) it is now a gym. chuckle at that thought.
- buena vista cafe (ridiculous irish coffee, get bombed so you can handle tourists)
- sfmoma de young/park/beach/cal academy
- twin peaks
- walk around SOMA, where most startups live; majority are in square bounded by [Market, 1st, Folsom, 3rd]
- do not walk around where new Twitter HQ will be; you will step on human feces, and it is next to one of the biggest peepshow theaters
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
# Why do | |
DATE_DIFF('2012-3-1', '2012-3-2') | |
# and | |
DATE_ADD('2012-3-1', INTERVAL 1 DAY) | |
# have different naming conventions? | |
# this returns [0, n] | |
select count(*), datediff(`a`,`b`) from `table` group by datediff(`a`,`b`) | |
# this returns n - k, k > 0 |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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 | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
(ns slack | |
(:require [clj-http.client :as client] | |
[clojure.data.json :as json])) | |
(defn send-to-slack | |
"Sends a simple message to slack using an 'incoming webhook'. | |
url will be of form: https://myapp.slack.com/services/hooks/incoming-webhook?token=mytoken . | |
(Exact url you should use will appear on the slack integration page) | |
text will be any valid message. | |
This implementation could be expanded if you wanted to specify channel, username, etc. |
Best talks day 1:
- Please, no More Minutes, Milliseconds, Monoliths... or Monitoring Tools! - Adrian Cockcroft
- gave 5 good rules for monitoring systems, showed what cloud / microservices monitoring looks like @ Netflix
- Simple math to get some signal out of your noisy sea of data - Toufic Boubez
- explains why static alert thresholds don't work and gave 3 techniques to use instead
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
- Does the design expect failures to happen regularly and handle them gracefully?
- Have we kept things as simple as possible?
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
# Drop the Coderpad default tables | |
drop table if exists alerts; | |
drop table if exists departments; | |
drop table if exists employees; | |
drop table if exists employees_projects; | |
drop table if exists projects; | |
drop table if exists sales; | |
drop table if exists signup_flow_events; | |
drop table if exists stores; | |
drop table if exists products; |
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
select | |
cast(use2.usename as varchar(50)) as owner, | |
pgc.oid, | |
trim(pgdb.datname) as Database, | |
trim(pgn.nspname) as Schema, | |
trim(a.name) as Table, | |
(b.mbytes / 1024) gbytes, | |
a.rows, | |
((case when a.rows > 0 then b.mbytes / a.rows::real end) * 1024) kb_per_row, | |
round(b.mbytes / (sum(b.mbytes) over ())::real * 100, 4) pct_of_cluster |
OlderNewer