Skip to content

Instantly share code, notes, and snippets.

View bzub's full-sized avatar

bzub bzub

View GitHub Profile
@tsuna
tsuna / count_hbase.sh
Created November 17, 2011 18:42
Script to get stats on the number of KeyValue and size of an HBase table, directly from HFiles
#!/bin/bash
# Copyright (c) 2010, 2011 Benoit Sigoure. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
@stuart-warren
stuart-warren / lineWithFocusChart-opentsdb.html
Last active December 16, 2015 01:19
Takes a URL to the ascii output of opentsdb and outputs json in a format easily used by the NVD3.js graph library (at least lineWithFocusChart) Will probably build on this to create a nicer frontend / dashboard NVD3 (http://nvd3.org/) - D3 js library OpenTSDB (http://opentsdb.net/) - Metric collection tool
<!DOCTYPE html>
<meta charset="utf-8">
<!-- this works from within the examples folder -->
<link href="../src/nv.d3.css" rel="stylesheet" type="text/css">
<style>
body {
@johann8384
johann8384 / create_table.rb
Last active October 30, 2017 03:23
Creating Tables for OpenTSDB
# usage: ./create_table.rb tsdb 255
include Java
import org.apache.hadoop.hbase.HBaseConfiguration
import org.apache.hadoop.hbase.HTableDescriptor
import org.apache.hadoop.hbase.client.HBaseAdmin
import org.apache.hadoop.hbase.HColumnDescriptor
conf = HBaseConfiguration.create
conf.set("zookeeper.znode.parent", "/hbase-unsecure");
@choang
choang / tsd.sh
Created May 20, 2013 19:14
OpenTSDB init script
#!/bin/sh
. /etc/init.d/functions
PIDFILE=/var/run/tsd.pid
LOCKFILE=/var/lock/subsys/tsd
TSD_CONF=/usr/local/etc/tsd.conf
TSDB_BIN=/usr/local/bin/tsdb
TSD_LOGDIR=/var/tmp/tsd
export TSDB_HOME=/usr/local/share/opentsdb
@mainframe
mainframe / on-dell-omsetup.sh
Created May 27, 2013 21:12
Setup Dell OpenManage software and management service
#!/bin/bash
# Copyright (C) 2013, OpenNode LLC. All rights reserved.
# Email: [email protected]
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@jbeda
jbeda / gist:2cae7dd22a453c3caa94
Last active November 7, 2020 18:26
URLs for kubernetes release artifacts
$ gsutil ls -R gs://kubernetes-release/release/v0.5.4 | sed 's|gs://kubernetes-release|https://storage.googleapis.com/kubernetes-release|; /^.*:$/d; /^$/d'
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-arm.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-salt.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-server-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/bin/darwin/386/kubecfg
@tobert
tobert / portacluster-arch-toolbox.sh
Created March 31, 2015 00:44
Quick & (very) dirty Arch Linux toolbox for CoreOS
#!/bin/sh
# /dev/sda3 is 200GB of XFS mounted on /srv
mkdir /srv/arch64
# my Arch install image is just a tarball of the root fs with all tools pre-installed
curl 192.168.10.10/installer/arch-x64-20150330.tar.gz |sudo tar -C /srv/arch64 -xzvf -
# start the Arch image the same way CoreOS's 'toolbox' script does
systemd-nspawn --directory=/srv/arch64 --capability=all --share-system --bind=/:/media/root --bind=/usr:/media/root/usr --user=root
@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@dm0-
dm0- / kernel-small.md
Last active July 30, 2019 19:53
Build a modified CoreOS kernel (no initramfs modules; X260 driver notes)

Download and start the CoreOS development image in a container. Make sure to bind writable directories over the kernel's build and install paths.

wget 'http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2'
bzcat coreos_developer_container.bin.bz2 > coreos_developer_container.bin
mkdir boot modules src
sudo systemd-nspawn \
    --bind="$PWD/boot:/boot" \
    --bind="$PWD/modules:/lib/modules" \

--bind="$PWD/src:/usr/src" \

@hervenicol
hervenicol / run.tpl
Last active May 12, 2023 14:20 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name={{.Name}} \
{{range $e := .Config.Env}}--env={{printf "%q" $e}} \
{{end}}{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \
{{end}}{{end}}{{range $n, $conf := .NetworkSettings.Networks}}{{with $conf}}--network {{printf "%q" $n}} \
{{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \
{{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \
{{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \
{{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \
{{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \