Skip to content

Instantly share code, notes, and snippets.

Carl Myers terabyte

Block or report user

Report or block terabyte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker.sh
#!/usr/bin/env bash
# Copyright (c) 2017 Cloudera, Inc. All rights reserved.
set -exo pipefail
# Usage: ./docker.sh
# Usage: ./docker.sh test/test.sh
# Usage: INTERACTIVE=1 ./docker.sh
# This script invokes the docker container, does the necessary contortions to
View publish_generic_gbn.groovy
// Copyright (c) 2019 Cloudera, Inc. All rights reserved.
/**
* Uploads a new GBN
*/
import com.cloudera.dsl.Common
freeStyleJob('PublishGenericGBN') {
View cauldron_cdh.groovy
// Copyright (c) 2016 Cloudera, Inc. All rights reserved.
// Cauldron CDH6.x Build job on all OSes.
// The OS list is defined in the cdh-local.mk Makefile
// in cdh.git, and is RH6, RH7, Debian8, SLES12, Ubuntu1604
// as of last writing.
package cauldron
import com.cloudera.dsl.Common
View publish_generic_gbn.groovy
// Copyright (c) 2019 Cloudera, Inc. All rights reserved.
/**
* Uploads a new GBN
*/
import com.cloudera.dsl.Common
freeStyleJob('PublishGenericGBN') {
View new-laptop-checklist.txt
1. Backup original image, if applicable
* Boot off thumb drive
* use external thumb drive for target of backup
* install pigz
* dd if=/dev/whatevs | pigz | split --size=1G - whatevs.img.gz
2. Install debian with full disk encryption
3. Apt-get install normal applications
* see: howtos/new-machine-apt-get.txt
4. Run burn-in tests
5. Rsync over homedir
View new-machine-apt-get.txt
apt-get update
apt-get upgrade -y
apt-get install -y vim htop less zsh tmux sudo git mosh gawk strace build-essential openjdk-8-jdk sysbench gdisk cryptsetup lvm2 tree screen dosfstools network-manager openconnect network-manager-openconnect lm-sensors xxd xz-utils pigz gcc g++ make cmake automake neovim perl screen libncurses5-dev ncurses-bin iotop iftop mpg123 locales-all tzdata locate libevent-dev pkg-config imagemagick exuberant-ctags libssl-dev rsync expect shellcheck curl nmap virtualenv python3 flake8 pv apt-transport-https dnsutils avahi-utils gist net-tools jq
# laptop only stuff
sudo apt-get install powertop laptop-detect rfkill pm-utils acpid xbacklight
# secondary coding stuff
sudo apt-get install docker.io
View bat-status-changed.sh
#!/usr/bin/env bash
# this script is run whenever the status of the AC adapter changes
# user who is expected to be running the x server (i.e. has Xauthority)
XUSER="cmyers"
# how long a delay between plugging in power and battery status no longer shows discharging
SLEEP_DELAY="0.5s"
View main.rs
extern crate json;
extern crate rhai;
use rhai::{Engine, RegisterFn, Scope};
use std::env;
use std::io::prelude::*;
use std::io;
fn jv_put_string(rec: &mut json::JsonValue, key: String, value: String) {
jv_put_jv(rec, key, json::JsonValue::from(value));
View Cargo.toml
[package]
name = "recs_test"
version = "0.1.0"
authors = ["Carl Myers <cmyers@cmyers.org>"]
[dependencies]
argparse = "0.2.2"
json = "0.11.13"
lazy_static = "1.2.0"
regex = "1.1.0"
@terabyte
terabyte / blah.java
Created May 24, 2018
{meme}Is this ok?
View blah.java
class A {
public void someMethod {
// ...
AtomicInteger count = new AtomicInteger();
someList.forEach((Object) o -> {
// ...
count.incrementAndGet();
// ...
}
}
You can’t perform that action at this time.