Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block terrancesnyder

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
terrancesnyder /
Last active Jan 31, 2020
automated merge hbase 0.98+ - Bash script that will invoke hshell to query for regions and then perform a merge_region command but only within each regionserver (to avoid data copy/locality issues)
echo "Examining Table $TABLE...."
echo "scan 'hbase:meta',{ COLUMNS => 'info:server', FILTER=>\"PrefixFilter('$TABLE')\"}" | hbase shell > "$TABLE.out" 2>&1
echo "Making splits $TABLE.splits"
echo "" > "$TABLE.splits"
View gist:95a6c98c1472ccd598cfd4e32f941f73
hadoop fsck / | egrep -v '^\.+$' | grep -v corrup | grep / | grep -oh '^\S*:' | rev | cut -c 2- | rev | sort | uniq > corrupted.flst
terrancesnyder / apiary.txt
Last active Aug 22, 2019
API Ary - Draft
View apiary.txt
[#-- @ftlvariable name="resourceApis" type="java.util.List<com.webcohesion.enunciate.api.resources.ResourceApi>" --]
[#-- @ftlvariable name="serviceApis" type="java.util.List<>" --]
[#-- @ftlvariable name="data" type="java.util.List<com.webcohesion.enunciate.api.datatype.Syntax>" --]
[#-- @ftlvariable name="title" type="java.lang.String" --]
[#-- @ftlvariable name="disableMountpoint" type="java.lang.Boolean" --]
[#-- @ftlvariable name="disableResourceLinks" type="java.lang.Boolean" --]
[#-- @ftlvariable name="apiRelativePath" type="java.lang.String" --]
[#-- @ftlvariable name="includeApplicationPath" type="java.lang.Boolean" --]
View email-template.html
<!doctype html>
<meta charset="utf-8">
<title>Catalina News</title>
<link href="|Roboto:100,300,400,500" rel="stylesheet">
body {
margin: 0px auto;
View gist:df73f89715ec41a7ceb4e270d8d370e5
Exception in thread "iothread-2" java.lang.NullPointerException
at zmq.Utils.tuneTcpSocket(
at zmq.TcpListener.acceptEvent(
at zmq.IOObject.acceptEvent(
Exception in thread "iothread-2" java.lang.NullPointerException
at zmq.Utils.tuneTcpSocket(
at zmq.TcpListener.acceptEvent(
at zmq.IOObject.acceptEvent(
terrancesnyder / CustomJwtTokenStore
Created May 30, 2017 — forked from maxsap/CustomJwtTokenStore
Spring Security OAuth2 programmatic configuration.
View CustomJwtTokenStore
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.commons.lang3.SerializationUtils;
import org.springframework.beans.factory.annotation.Autowired;
View network security groups
root@dndubuntu1204:/home/azureuser/azure-xplat-cli-azure-dev# node bin/azure network nsg rule set armrestestgrp2n nsg2n nsgrule2n -d 'Allow incoming traffic from proxy22' -p 'Tcp' -f '' -o '*' -e 'VirtualNetwork' -u '7000-7500' -c Allow -r Outbound
info: Executing command network nsg rule set
+ Looking up the network security group "nsg2n"
+ Setting a network security rule "nsgrule2n"
+ Looking up the network security group "nsg2n"
data: Id : /subscriptions/bfb5e0bf-124b-4d0c-9352-7c0a9f4d9948/resourceGroups/armrestestgrp2n/providers/Microsoft.Network/networkSecurityGroups/nsg2n/securityRules/nsgrule2n
data: Name : nsgrule2n
data: Type : Microsoft.Network/networkSecurityGroups/securityRules
data: Provisioning state : Succeeded
data: Description : Allow incoming traffic from proxy22

Date Support

The dates used within the platform support more than simple date/time constraints. Almost all dates within the platform are strings and have special semantics when dealing with periodicity as well as general date/math functions that make it much easier to specify effective start/stop period and work within date ranges.

Basic Date Format

The basic date format is defined as YYYY-MM-DDThh:mm:ssZ where:

  • YYYY is the year.
  • MM is the month.
  • DD is the day of the month.
View variables.sql
r.db('test').table('templates').getField('variables').concatMap(function(v) {
return v('name')
sudo ifdown --exclude=lo -a && sudo ifup --exclude=lo -a
You can’t perform that action at this time.