This file contains hidden or 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
// This Protobuf schema is generated by DataMeta exporter. | |
syntax = "proto3"; | |
package org.ebay.datameta.examples.conv.protobuf; | |
enum BaseColor { | |
Red = 0; | |
Green = 1; | |
Blue = 2; |
This file contains hidden or 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
{ | |
"type": "record", "namespace":"org.ebay.datameta.examples.conv.avro.v1_0_0", "name" : "AllTypes", | |
"fields": [ | |
{"name" : "id", "type": "int"} , | |
{"name" : "count", "type": "long"} , | |
{"name" : "isIt", "type": "boolean"} , | |
{"name": "code", "type":{"name": "code", "type": "fixed", "size": 5}}, | |
{"name" : "width", "type": ["float", "null"]} , | |
{"name" : "height", "type": "double"} , |
This file contains hidden or 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/zsh | |
#!/bin/bash | |
# This show how to dierect console output to the screen as one natural flow but split it to STDERR and STDOUT | |
# There are many recipes for this, but this is the only thing that works fine with both zsh and bash | |
# Remove the tee's -a flag to start the files anew, it means "append" | |
# define the output file name, you'll have 2 files in the end: $lFile.out for STDOUT and $lFile.err for STDERR | |
export lFile='try' | |
function tOut { | |
tee -a $lFile.out |
This file contains hidden or 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/awk -f | |
BEGIN { | |
while (( getline w < "positive-words.txt") > 0) { | |
if (! (substr(w,0,1) == ";") && (w != "")) good[w] = 1; | |
} | |
while (( getline w < "negative-words.txt") > 0) { | |
if (! (substr(w,0,1) == ";") && (w != "")) bad[w] = 1; | |
} | |
} |
This file contains hidden or 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
# Whichever shell are now running | |
set-option -g default-shell $SHELL | |
set -g default-terminal "screen-256color" | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-selection | |
# C-b is not acceptable -- Vim uses it (page back) | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a last-window |
This file contains hidden or 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
import java.math.BigDecimal; | |
import java.math.RoundingMode; | |
import static java.math.BigDecimal.ONE; | |
import static java.math.BigDecimal.ZERO; | |
public class BaileyBorweinPlouffePi { | |
public static void mayn(String[] argv) { | |
double pi = 0; | |
final int iter = Integer.parseInt(argv[0]); |
This file contains hidden or 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
mvn deploy:deploy-file -DgroupId=org.acme ^ | |
-DartifactId=acme-foo-driver ^ | |
-Dversion=0.1 ^ | |
-Dpackaging=jar ^ | |
-Dfile=acme-foo.jar ^ | |
-DrepositoryId=acme.foo.releases ^ | |
-Durl=http://mavensvr.acme.com/repositories/acme.foo.releases | |
:: Examples of adding either javadocs or sources to existing, note the -Dclassifier switch | |
:: User cases: to disable generating POM, add | |
:: -DgeneratePom=false -DpomFile=... |
This file contains hidden or 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
# the RegEx to parse the result of hadoop fs -ls | |
@hdfs_ls_regex= %r{ \A | |
([rwxd\-]+) (?# permissions) \s+ | |
([\-\d]+) (?# replicas) \s+ | |
(\w+) (?# user) \s+ | |
(\w+) (?# group) \s+ | |
(\d+) (?# size) \s+ | |
([\d\-]+) (?# date) \s+ | |
([\d:]+) (?# time) \s+ |
This file contains hidden or 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
# Comparing Firefox, Google Chrome and Internet Explorer memory footprints | |
# also check: PeakWorkingSet, PrivateWorkingSet, PagedMemorySize etc | |
# ps is an alias for Get-Process, WS is short for "WorkingSet", -exp for "-expand" | |
function sumProc($partialName) { ps "$partialName*" | Measure-Object -prop WS -sum | select -exp Sum } | |
sumProc firef | |
sumproc chrome | |
sumproc iexp |
NewerOlder