Skip to content

Instantly share code, notes, and snippets.

@jeredding
jeredding / switch_to_main.sh
Created January 26, 2022 20:29 — forked from matschaffer/switch_to_main.sh
A bash helper for switching a local clone and a github fork from master to main.
#!/usr/bin/env bash
set -euo pipefail
echo ":: Renaming local master to main"
git branch -m master main || true
git fetch origin
git remote set-head origin -a
if git remote show upstream >/dev/null 2>&1; then

Keybase proof

I hereby claim:

  • I am jeredding on github.
  • I am erikthered (https://keybase.io/erikthered) on keybase.
  • I have a public key whose fingerprint is E299 E59C 7E50 ED24 0059 1BF2 2F26 A1D8 A6AC 0478

To claim this, I am signing this object:

//
// libuuid sample program
//
// library install for debian
// $ sudo apt-get install uuid-dev
//
// compile
// $ gcc uuid_test.c -luuid -o uuid_test
//
#include <stdio.h>
require 'rubygems'
require 'rubygems/package'
require 'zlib'
require 'fileutils'
module Util
module Tar
# Creates a tar file in memory recursively
# from the given path.
#
#!/bin/sh
# Do elasticsearch optimize on logstash previous day index
# if $1 = all then optimize all indicies
esindex="/opt/elasticsearch/data/elasticsearch/nodes/0/indices"
# Grab yesterday's values
D=`date +%d -d yesterday`
M=`date +%m -d yesterday`
Y=`date +%Y -d yesterday`
@jeredding
jeredding / gist:3907311
Created October 17, 2012 18:45
Error processing transform/mapping on Event Class /Status/instances/openvz_container_created
2012-10-17 16:43:40,806 INFO zen.ZenHub: Worker reports 2012-10-17 16:43:40,806 WARNING zen.Events: Error processing transform/mapping on Event Class /Status/instances/openvz_container_created
Problem on line 245: NameError: global name 'ShellCommandJob' is not defined
Transform:
0 from ZenPacks.zenoss.OpenVZ.transforms import remodel
1 remodel(evt,device)