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 | |
OPTS="" | |
OPTS="$OPTS -nodefaults" | |
OPTS="$OPTS -enable-kvm" | |
OPTS="$OPTS -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time" | |
OPTS="$OPTS -smp 4" | |
OPTS="$OPTS -m 4G" | |
OPTS="$OPTS -usb -device usb-tablet" |
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 | |
# This script is based on https://unix.stackexchange.com/revisions/480191/9. | |
# Recommended SIZE setting for different drives: | |
# (SATA) SSD: 1024 (default) | |
# (ANY) HDD: 256 | |
# (High End NVME) SSD: 4096 | |
# (Low-Mid End NVME) SSD: 1024 (default) |
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 | |
# This script is based on https://unix.stackexchange.com/revisions/480191/9 . | |
# The following changes proved to be necessary to make it work on CentOS 7: | |
# * removed disk info (model, size) - not very useful, might not work in many cases. | |
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base) | |
# * escaping exclamation mark in sed command | |
# * the ".fiomark.txt" is not auto-removed | |
LOOPS=5 #How many times to run each test |
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
# https://istio.io/docs/tasks/traffic-management/egress/#configuring-istio-external-services | |
# In this example the bucket is in the us-east-1 region | |
# Make sure to match the host with the endpoint of your region: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: ServiceEntry | |
metadata: | |
name: egress-amazon-s3 | |
spec: | |
hosts: | |
- my-bucket-name.s3.amazonaws.com |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
func main() { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Stephen subscriptions in feedly Cloud</title> | |
</head> | |
<body> | |
<outline text="Companies" title="Companies"> | |
<outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/> | |
<outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/> |
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
from cryptography import x509 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import hashes, serialization | |
from cryptography.hazmat.primitives.asymmetric import rsa | |
from cryptography.x509.oid import NameOID | |
import datetime | |
import uuid | |
one_day = datetime.timedelta(1, 0, 0) | |
private_key = rsa.generate_private_key( | |
public_exponent=65537, |
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 -- | |
# requires bash 4.0+ | |
### FUNCTIONS | |
# usage: error_exit message | |
function error_exit() { | |
echo -e "\e[31m$1\e[0m" | |
exit 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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |