This is a quick reference to get to Jolokia statistics urls for JBoss Fuse or JBoss A-MQ statistics. Sometimes, when you are interested in very specific attributes, it's easier to keep monitoring a specific url rather than loading the full Hawtio console.
This file contains 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
CREATE SCHEMA staging; | |
CREATE EXTENSION postgres_fdw; | |
CREATE SERVER staging FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'hostname', dbname 'dbname', port'5432'); | |
CREATE USER MAPPING FOR CURRENT_USER SERVER staging OPTIONS (user 'username', password 'password'); | |
IMPORT FOREIGN SCHEMA public FROM SERVER staging INTO staging; | |
-- CREATE TABLE public.lol AS SELECT * from staging.users where <whatever>... |
This file contains 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
\set PROMPT1 '%[%033[33;1m%]%x%[%033[0m%]%[%033[1m%]%/%[%033[0m%]%R%# ' | |
\timing | |
\pset linestyle unicode | |
\pset border 2 | |
\set show_slow_queries 'SELECT (total_time / 1000 / 60) as total_minutes, (total_time/calls) as average_time, query FROM pg_stat_statements ORDER BY 1 DESC LIMIT 100;' | |
\x auto | |
\pset null '␀' | |
\set COMP_KEYWORD_CASE upper | |
\pset format wrapped |
This file contains 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
function eyserver { | |
local ey_env=$1 | |
local server_scope=$2 | |
if [ "$ey_env" = "" ]; then | |
ey_env="stipple_prod" | |
fi | |
if [ "$server_scope" = "" ]; then | |
server_scope="--all" |
This file contains 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
defaults: | |
:port: 6379 | |
:host: localhost | |
development: | |
:db: 2 | |
:namespace: development | |
# force use of Redis::Distributed | |
:host: | |
- localhost |
This file contains 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
function eyserver { | |
local ey_env=$1 | |
local server_scope=$2 | |
if [ "$ey_env" = "" ]; then | |
ey_env="stipple_prod" | |
fi | |
if [ "$server_scope" = "" ]; then | |
server_scope="--all" |
This file contains 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
tell application "iTerm" | |
activate | |
set t to (make new terminal) | |
tell t | |
set number of columns to 100 | |
set number of rows to 30 | |
tell (make new session at the end of sessions) | |
exec command "mutt" | |
end tell | |
end tell |
This file contains 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/bash | |
# | |
# Author: Eric Gebhart | |
# | |
# Purpose: To be called by mutt as indicated by .mailcap to handle mail attachments. | |
# | |
# Function: Copy the given file to a temporary directory so mutt | |
# Won't delete it before it is read by the application. | |
# | |
# Along the way, discern the file type or use the type |
This file contains 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
// Usage: http://localhost:8080/image.jpg/100x50 | |
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
http.createServer(function(req, res) { | |
var params = req.url.split('/'); | |
var convert = spawn('convert', [params[1], '-resize', params[2], '-']); | |
res.writeHead(200, {'Content-Type': 'image/jpeg'}); | |
convert.stdout.pipe(res); |
This file contains 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
module Paperclip | |
class Watermark < Processor | |
# Handles watermarking of images that are uploaded. | |
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options, :watermark_path, :watermark_offset, :overlay, :position | |
def initialize file, options = {}, attachment = nil | |
super | |
geometry = options[:geometry] | |
@file = file | |
@crop = geometry[-1,1] == '#' |
NewerOlder