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"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_pressed="true"> | |
<layer-list> | |
<item> | |
<bitmap android:gravity="center" android:src="@drawable/album" /> | |
</item> | |
<item> | |
<shape> |
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 com.tomgibara.android.util; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* A layout that arranges views into a grid of same-sized squares. |
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 | |
# | |
# net_setup.sh | |
# | |
# Creates a virtual bridge | |
# | |
# ... Must be run with root priviledges ... | |
BRIDGE="virtbr0" |
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
# Cassandra Cluster | |
apiVersion: cassandra.rook.io/v1alpha1 | |
kind: Cluster | |
metadata: | |
name: rook-cassandra | |
namespace: rook-cassandra | |
spec: | |
version: 3.11.1 | |
mode: cassandra | |
datacenter: |
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 cassandra.cluster import Cluster | |
# Naming: <cluster-name>-client.<namespace>.cluster.local | |
cluster = Cluster(['rook-cassandra-client.rook-cassandra.svc.cluster.local']) | |
session = cluster.connect() | |
# Do interesting stuff | |
# .... |
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 python3 | |
import argparse | |
template = """ | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: {d.name}-{} | |
namespace: rook-cassandra | |
labels: |
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 scylla_code_assignment | |
import ( | |
"context" | |
"github.com/pkg/errors" | |
log "github.com/sirupsen/logrus" | |
"golang.org/x/time/rate" | |
"net" | |
"time" | |
) |
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 netrl_test | |
import ( | |
"context" | |
"errors" | |
"flag" | |
"io" | |
"log" | |
"net" | |
"sync" |
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
# Scale Up the Cassandra Cluster | |
kubectl edit clusters.cassandra.rook.io rook-cassandra -n rook-cassandra |
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 | |
set -e | |
# Edit according to your preference | |
GCP_USER="$(gcloud config list account --format "value(core.account)")" | |
GCP_PROJECT="$(gcloud config list project --format "value(core.project)")" | |
GCP_ZONE="us-west1-b" | |
CLUSTER_NAME="kubeflow" |
OlderNewer