$ tree ~/Downloads/elasticsearch-0.20.4
/Users/dehora/Downloads/elasticsearch-0.20.4
├── LICENSE.txt
├── NOTICE.txt
├── README.textile
├── bin
│ ├── elasticsearch
│ ├── elasticsearch.in.sh
│ └── plugin
├── config
# app id then 500 | |
grep "app_id" error.log | grep "500" | |
# show some context around the pattern | |
grep -B 2 -A 10 "FATAL" log.txt | |
# unique ips for an app_id | |
grep 'app_id' access.log | cut -d' ' -f1 | sort | uniq |
find . | grep "snaps" | |
find . | grep "*.rb" | grep .. | |
grep -r require . | less -s # js minify |
Pry.hooks.add_hook :after_read, :hack_utf8 do |str, _| | |
str.force_encoding('utf-8') | |
end |
public void removeJsonProcessingExceptionMapper(Environment environment) { | |
Set<Object> singletons = environment.getJerseyResourceConfig().getSingletons(); | |
List<Object> singletonsToRemove = Lists.newArrayList(); | |
for (Object s : singletons) { | |
if (JsonProcessingExceptionMapper.class.isAssignableFrom(s.getClass())) { | |
singletonsToRemove.add(s); | |
} | |
} | |
for (Object s : singletonsToRemove) { | |
singletons.remove(s); |
var page = require('webpage').create(); | |
var system = require('system'); | |
if (system.args.length === 1) { | |
console.log('Usage: clip.js <url>'); | |
phantom.exit(1); | |
} else { | |
address = system.args[1]; | |
page.open(address, function () { | |
var title = page.evaluate(function () { |
object ಠ_ಠ { | |
class ಠ_ಠ(m: String) extends Exception(m) | |
def main(a: Array[String]) = { | |
throw new ಠ_ಠ("ಠ_ಠ") | |
} | |
} |
#!/bin/bash | |
# Defaults | |
PORT=2181 | |
HOSTNAME="${COLLECTD_HOSTNAME:-localhost}" | |
INTERVAL="${COLLECTD_INTERVAL:-5}" | |
# Generic function for putting a value out there | |
put_gauge() { | |
NAME=$1 |
#!/bin/bash | |
SCALA_VERSION="2.9.2" | |
desc="Kafka (kafka-server)" | |
if [ -f /etc/sysconfig/kafka ]; then | |
. /etc/sysconfig/kafka | |
fi |
$ tree ~/Downloads/elasticsearch-0.20.4
/Users/dehora/Downloads/elasticsearch-0.20.4
├── LICENSE.txt
├── NOTICE.txt
├── README.textile
├── bin
│ ├── elasticsearch
│ ├── elasticsearch.in.sh
│ └── plugin
├── config
#!/bin/sh | |
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |