Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
#!/bin/bash | |
IP="192.168.1.22" | |
SUBJECT_CA="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=CA/CN=$IP" | |
SUBJECT_SERVER="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Server/CN=$IP" | |
SUBJECT_CLIENT="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Client/CN=$IP" | |
function generate_CA () { | |
echo "$SUBJECT_CA" | |
openssl req -x509 -nodes -sha256 -newkey rsa:2048 -subj "$SUBJECT_CA" -days 365 -keyout ca.key -out ca.crt |
#!/bin/bash | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 | |
# Download the Let’s Encrypt Client | |
cd /usr/local/sbin | |
sudo wget https://dl.eff.org/certbot-auto | |
sudo chmod a+x /usr/local/sbin/certbot-auto | |
# Set Up the SSL Certificate |
export GOROOT=/usr/local/go | |
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH:$WORKSPACE/bin | |
export GOPATH=$WORKSPACE | |
git config url."git@github.com:".insteadOf "https://github.com/" | |
go get github.com/AlekSi/gocov-xml | |
go get github.com/axw/gocov/gocov | |
mkdir -p $GOPATH/src/github.com/NextUserSF/ |
from tastypie import fields | |
from tastypie.authentication import Authentication | |
from tastypie.authorization import Authorization | |
from tastypie.bundle import Bundle | |
from tastypie.exceptions import NotFound | |
from tastypie.resources import Resource | |
# a dummy class representing a row of data | |
class Row(object): |
It is generally desirable to group all the hosts for a specific service into a single dashboard view. For example, all the web servers are in single view while all the database servers are in another view.
This is usually not an issue when you are sending custom metrics using Riemann client. However, there are cases where you are using something that you do not control how the metrics are being sent. i.e., Riemann-tools.
Since Riemann-tools scripts are application agnostic, in order for the dashboard view to group hosts, we must inject some application specific information into the tags field. Tags is a collection of arbitrary strings. In the case of Riemann-tools scripts you can pass in arbitrary strings on the command line.
riemann-health --host 127.0.0.1 --tag "prod" --tag "webserver"
SELECT 'drop table '||n.nspname ||'.'|| c.relname||' CASCADE;' as "Name" | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r','v','S','') | |
AND n.nspname = 'destination_schema'; | |
SELECT 'create table '||n.nspname ||'.'|| c.relname||' as select * from source_schema.' || c.relname||';' as "Name" | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r','v','S','') |
SELECT 'UNLOAD (\'select * from '||n.nspname ||'.'|| c.relname||'\') TO \'s3://bucket/' || c.relname || '_\';' as "Name" | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace | |
WHERE c.relkind IN ('r','v','S','') | |
AND n.nspname LIKE 'nu_alibris'; | |
SELECT 'COPY ' || n.nspname ||'.'|| c.relname ||' from \'s3://bucket/' || c.relname || '_\';' as "Name" | |
FROM pg_catalog.pg_class c | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace |
#!/usr/bin/env python | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
class Daemon: | |
""" | |
A generic daemon class. | |
Usage: subclass the Daemon class and override the run() method |