Skip to content

Instantly share code, notes, and snippets.

- hosts: all
sudo: yes
tasks:
- name: deregister smtp server from loadbalancer
local_action: loadbalancer name=lbsmtp instance=smtp001 load_balancer_port=465 instance_port=10025 state=absent region=jp-east-1 aws_secret_access_key=xxxxxx aws_access_key_id=xxxxxx
register: result
- debug: var=result
- name: register smtp server to loadbalancer
#!/usr/bin/python
# -*- coding: utf-8 -*-
# this ansible module can maintain niftycloud loadbalancer
# see https://github.com/yudai09/niftycloud/tree/master/niftycloud/computing/loadbalancer
import json
try:
import niftycloud.computing.loadbalancer
HAS_NIFTYCLOUD_MODULE = True
except ImportError:
$ easy_install sftpserver
# create ssh_key
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sci01436/.ssh/id_rsa): ./test_rsa.key
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./test_rsa.key.
Your public key has been saved in ./test_rsa.key.pub.
THREADS=300
ULIMITS=4096
DOMAIN=your.domain
function dig(){
for i in $(seq $THREADS); do
dig @localhost $DOMAIN &
done
wait
#-*- coding:utf-8
def main():
a=[102, 3, 15, 1, 11, 5, -1, 4, 5]
print "start %s" % (a)
b = bubble_sort(a)
q = quick_sort(a)
print "bubble %s" % (b)
print "quick %s" % (q)
diff --git a/modules/geobackend/geobackend.cc b/modules/geobackend/geobackend.cc
index 287db2f..9f9ef35 100644
--- a/modules/geobackend/geobackend.cc
+++ b/modules/geobackend/geobackend.cc
@@ -25,20 +25,13 @@ using boost::trim_right;
// Static members
-IPPrefTree * GeoBackend::ipt;
-vector<string> GeoBackend::nsRecords;
# spinner characters
# http://stackoverflow.com/questions/2685435/cooler-ascii-spinners
# spinner code
# https://github.com/IntellexApps/blcheck.git
# Define spinner
#SPINNER="-\|/"
#SPINNER=".oO@*"
#SPINNER="▉▊▋▌▍▎▏▎▍▌▋▊▉"
#!/bin/sh
# TODO: error handling
if [ ${EUID:-${UID}} != 0 ]; then
echo 'root can exec this script.'
exit 1
fi
bk_suffix=.bk$(date +%Y%m%d%H%M)
# -*- coding: utf-8 -*-
import email
import poplib
import time
import smtplib
import sys
import traceback
# ------目的---------------------
# このスクリプトはメール配送にかかっている時間を測定する。
# Zabbix等と組み合わせてメールの遅延状況を監視するために使うことを想定している。
import os
import glob
import numpy as np
import keras
from keras.callbacks import ModelCheckpoint
from keras.preprocessing import image
from keras.preprocessing.image import ImageDataGenerator
from keras.layers import Input
from vis.visualization import visualize_cam, overlay