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
# Get number of virtual servers via SLAPI | |
import SoftLayer | |
client = SoftLayer.Client() | |
for user in client['Account'].getUsers(mask='id,username'): | |
count1 = client['User_Customer'].getVirtualGuestCount(id=user['id']) | |
vss = client['User_Customer'].getVirtualGuests(id=user['id'], mask='id') |
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
from boto.ec2.connection import EC2Connection | |
for region in EC2Connection().get_all_regions(): | |
region | |
region.connect().get_all_zones() |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# [require] Markdown module | |
# [usage] $ ./md2html.py markdown_file.md | |
# | |
import sys, os, re | |
from markdown import Markdown | |
md = Markdown() | |
for in_file in sys.argv: |
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
from redmine import Redmine | |
class ProjectNode(object): | |
def __init__(self, project): | |
self.project = project | |
self.children = [] | |
self.has_parent = hasattr(project, u'parent') | |
def add_child(self, child): | |
self.children.append(child) |
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
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<!-- | |
wlp.xml : WebSphere Liberty Profile service manifest, NAKAJIMA Takaaki | |
Installation | |
1. Install WebSphere Liberty Profile | |
See also https://developer.ibm.com/wasdev/websphere-liberty/ | |
2. Put this manigest in standard location (e.g. /var/svc/manifest/site/wlp.xml) | |
3. Run 'svcadm restart manifest-import' |
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
<?xml version='1.0'?> | |
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> | |
<service_bundle type='manifest' name='elasticsearch'> | |
<service name='application/elasticsearch' type='service' version='0'> | |
<create_default_instance enabled='true'/> | |
<single_instance/> | |
<dependency name='fs' grouping='require_all' restart_on='none' type='service'> |
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
// It diverges 4611686022000000000 -1.024000e+03 | |
package main | |
import "fmt" | |
const gigaInt = 1000000000 | |
const gigaExp = 1e9 | |
func main() { | |
var i = uint64(0) |
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
# See also | |
# | |
# * http://securityintelligence.com/a-gentle-introduction-to-the-x-force-exchange-api | |
# * https://api.xforce.ibmcloud.com/doc/#!/Authentication/get_auth_api_key | |
# | |
import requests | |
import json | |
URL = 'https://xforce-api.mybluemix.net:443' |
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
<?xml version='1.0'?> | |
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> | |
<service_bundle type='manifest' name='logstash'> | |
<service name='application/logstash' type='service' version='0'> | |
<create_default_instance enabled='true'/> | |
<single_instance/> | |
<dependency name='fs' grouping='require_all' restart_on='none' type='service |
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
NAME := my_go_program | |
VERSION := $(shell git describe --tags) | |
REVISION := $(shell git rev-parse --short HEAD) | |
SRCS := $(shell find . -type f -name '*.go') | |
LDFLAGS := -ldflags="-s -w -X \"main.Version=$(VERSION)\" -X \"main.Revision=$(REVISION)\" -extldflags \"-static\"" | |
all: bin/$(NAME) dist | |
bin/$(NAME): $(SRCS) |
OlderNewer