- Twitter or Facebookのアカウント or HN等
- @arte_nut (github:azurecube)
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
(define (script-fu-resize-export img) | |
(let* | |
((filename (car (reverse (strbreakup (car (gimp-image-get-filename img)) "/")))) | |
(dirname (foldr (lambda (base elm) (string-append base elm "/")) "" (reverse (cdr (reverse (strbreakup (car (gimp-image-get-filename img)) "/")))))) | |
(drawable (car (gimp-image-get-active-layer img))) | |
(retouch (string-append dirname "retouch/" filename)) | |
(resize (string-append dirname "retouch/" "resize/" filename))) | |
; (file-jpeg-save RUN-NONINTERACTIVE img drawable retouch retouch 1 0 1 0 "" 0 1 0 0) | |
(gimp-file-save RUN-NONINTERACTIVE img drawable retouch retouch) | |
(gimp-image-scale img (* 0.32 (car (gimp-image-width img))) (* 0.32 (car (gimp-image-height img)))) |
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/bash | |
#check oplion by command first character | |
op=$(echo $(basename $0 ) | cut -b 1) | |
# parent process list | |
plist=("$$") | |
# add parent processes | |
ppid() { |
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/bash | |
# This script checked on CM5.2.1 and CDH5.2.1 | |
# Properties | |
CMNODE="node1.cloudera.com" | |
TARGET="node1.cloudera.com node2.cloudera.com node3.cloudera.com" | |
CLUSTER="Cluster1" | |
ROOT_PASS="cloudera" | |
BASE=http://$CMNODE:7180/api/v8 |
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/bash | |
# This script checked on CM5.2.1 and CDH5.2.1 | |
# This assumes cm agents started up on each nodes | |
# Properties | |
CMNODE="node3.cloudera.com" | |
TARGET="node4.cloudera.com node3.cloudera.com" | |
CLUSTER="Cluster1" | |
ROOT_PASS="cloudera" | |
BASE=http://$CMNODE:7180/api/v8 |
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 is tested on CDH 5.4/CentOS6.4 | |
# C part is based on the samples from http://www.easysoft.com/developer/languages/c/odbc_tutorial.html | |
# Create target Table via Impala | |
impala-shell <<EOF | |
create table test (c1 int); | |
insert into test values (1); | |
EOF | |
# Package Installation |
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 is tested on CDH 5.3/CentOS6.2 | |
# C part is based on the samples from http://www.easysoft.com/developer/languages/c/odbc_tutorial.html | |
# Create target Table via Impala | |
impala-shell <<EOF | |
create table test (c1 int); | |
insert into test values (1); | |
EOF | |
# Package Installation |
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/bash | |
# !!Note Please execute this on more than 4 node cluster!! | |
# Setting HA as following | |
# node1: Active NN zk1 | |
# Node2: Standby NN jn1 zk2 | |
# Node3: jn2 zk3 | |
# Node4: jn3 | |
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/bash | |
# Setup | |
CMNODE=`hostname -A | cut -d' ' -f1` | |
BASE=http://$CMNODE:7180/api/v8 | |
USERNAME="admin" | |
USERPASS="admin" | |
CLUSTER=$(curl -X GET -u "$USERNAME:$USERPASS" -i $BASE/clusters | grep '"name"' | awk -F'"' '{print $4}') | |
nodes=$(curl -X GET -u "$USERNAME:$USERPASS" -i $BASE/hosts | grep hostname | awk -F'"' '{print $4}') |