sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
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 | |
# Author: Pat Migliaccio <pat@patmigliaccio.com> | |
# License: MIT | |
EMAIL="<Acct_Email>" | |
ZONE="<Zone_ID>" | |
API_KEY="<API_Key>" | |
DATA="{ \"files\": [\"https://example.com/css/style.css\"] }" |
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
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |
Hello (<-- two spaces)
World
Hello
World
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
readinessProbe: | |
exec: | |
command: ["/root/grpc_health_probe", "-addr=:6666"] | |
initialDelaySeconds: 1 | |
livenessProbe: | |
exec: | |
command: ["/root/grpc_health_probe", "-addr=:6666"] | |
initialDelaySeconds: 2 | |
imagePullPolicy: IfNotPresent |
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
resource "digitalocean_droplet" "web" { | |
image = "ubuntu-16-04-x64" | |
name = "web-1" | |
region = "sgp1" | |
size = "512mb" | |
ssh_keys = [12345] | |
connection { | |
type = "ssh" | |
user = "root" |
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 | |
# | |
# Purge the CloudFlare cache after pushing an update to GitHub Pages | |
# | |
# To use, rename this file to "post-receive" and drop it into the `.git/hooks/` directory in your project's root. | |
# Change the $branch value based on the type of page you're deploying. | |
# Use "master" for Organization Pages, and "gh-pages" for Project Pages. | |
# | |
# Find your CloudFlare API token here: https://www.cloudflare.com/a/account/my-account |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: myproject | |
name: myproject | |
namespace: default | |
spec: | |
progressDeadlineSeconds: 600 | |
replicas: 1 |
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/bash | |
NAMESPACE=usecaseapp | |
SERVICE=usecaseapp | |
cat <<EOF | cfssl genkey - | cfssljson -bare server | |
{ | |
"hosts": [ | |
"${SERVICE}.${NAMESPACE}.svc.cluster.local" | |
], |