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
@echo off | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
::this also support calls that contains a absolute windows path | |
::check of one of the params contain a absolute windows path | |
echo.%* | findstr /r /c:"[a-z]:[\\/]" > nul | |
if %errorlevel% == 1 ( | |
::if not just git with the given parameters | |
call :git %* |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
func dumpMap(space string, m map[string]interface{}) { | |
for k, v := range m { | |
if mv, ok := v.(map[string]interface{}); ok { |
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
# Pull the SDD1306 lib from here https://github.com/adafruit/micropython-adafruit-ssd1306/blob/master/ssd1306.py | |
from time import sleep_ms | |
from machine import Pin, I2C | |
from ssd1306 import SSD1306_I2C | |
buf = "wubba lubba dub dub " | |
i2c = I2C(-1, Pin(4),Pin(5),freq=40000) # Bitbanged I2C bus | |
assert 60 in i2c.scan(), "No OLED display detected!" |
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 | |
#set these in your environment/profile (NOT HERE) | |
AWS_ACCESS_KEY="" | |
AWS_SECRET_KEY="" | |
function s3get { | |
#helper functions | |
function fail { echo "$1" > /dev/stderr; exit 1; } | |
#dependency check |
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
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
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
func (repo *Repo) Pull() error { | |
branch, err := repo.Branch() | |
if err != nil { | |
return err | |
} | |
// Get the name | |
name, err := branch.Name() | |
if err != nil { | |
return err |
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
# Edit ~/.bash_profile | |
export GOPATH=/Users/$USER/go | |
export PATH=$GOPATH/bin:$PATH | |
# Reload profile : source ~/.bash_profile |
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 | |
if [ ! -f /tmp/provisioned ]; then | |
apt-get update | |
apt-get install -y daemon wget unzip | |
touch /tmp/provisioned | |
fi | |
Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator
This document is an attempt to describe the first step of a large project structure with flask and some basic modules:
- SQLAlchemy
- WTForms
Please feel free to fix and add your own tips.
NewerOlder