Skip to content

Instantly share code, notes, and snippets.

View nati's full-sized avatar

Nachi Ueno nati

View GitHub Profile
>>> a = [(1,),(2,),(3,)]
>>> [a[0] for x in a]
[(1,), (1,), (1,)]
>>> [x[0] for x in a]
[1, 2, 3]
http://archive.ubuntu.com/ubuntu/dists/saucy/main/installer-i386/current/images/netboot/
heat_template_version: 2013-05-23
description: >
HOT template to create a new neutron network plus a router to the public
network, and for deploying two servers into the new network. The template also
assigns floating IP addresses to each server so they are routable from the
public network.
preview: https://cdn3.iconfinder.com/data/icons/tango-icon-library/48/network-server-64.png
DEBUG: neutronclient.client
REQ: curl -i http://216.69.95.13:9696/v2.0/ports.json -X POST -H "X-Auth-Token: TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"port": {"network_id": "43135eec-e573-4526-8139-0fbbff50f8e5", "fixed_ips": [{"subnet_id": "32f09db6-9bf3-4e15-bbcc-ee4baca4bd62"}], "admin_state_up": true}}'
DEBUG: neutronclient.client RESP:{'date': 'Tue, 08 Apr 2014 00:58:25 GMT', 'status': '201', 'content-length': '503', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-532033b4-39f6-4cf0-b9bb-8d865bfa24d7'} {"port": {"status": "DOWN", "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "43135eec-e573-4526-8139-0fbbff50f8e5", "tenant_id": "9b2cba10b406405681f148b5a6b99ada", "binding:vnic_type": "normal", "device_owner": "", "mac_address": "fa:16:3e:72:27:df", "fixed_ips": [{"subnet_id": "32f09db6-9bf3-4e15-bbcc-ee4baca4bd62", "ip_address": "10.1.0.8"}], "id": "0145a78f-a383-41
<source>
type exec
command sh /etc/td-agent/stats.sh
format tsv
keys hostname,nginx,memcached
tag stats
run_interval 5
</source>
<match stats>
@nati
nati / cube.py
Last active August 29, 2015 14:07
import math
import time
import sys
HEIGHT = 50
WIDTH = 200
SCALE = 7
X = 0
(1) merge master for dev branch
* commit 22d31273b5296fee636b94e18b073837d22361a9
|\ Merge: 5737ec5 b0e81b5
| | Author:
| | Date: Mon Jul 13 21:14:42 2015 +0900
| |
| | Merge branch 'master' into development
| |
@nati
nati / gist:878000
Created March 20, 2011 02:26
無限PUSH
while(1){
@d6rkaiz PUSH PUSH PUSH
}
@nati
nati / gist:877996
Created March 20, 2011 02:25
ふが
テスト
www-data@ip-10-146-13-233:~/ushahidi$ grep -R "/kml" *
application/views/markers.php:echo "<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n";
application/views/markers.php:echo "</kml>\n";
application/libraries/api/MY_Kml_Api_Object.php: <kml xmlns="http://earth.google.com/kml/2.2">
application/libraries/api/MY_Kml_Api_Object.php: </kml>';
media/js/OpenLayers.js:OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{kmlns:"http://earth.google.com/kml/2.0"
sDesc:"Exported on "+new Date,extractAttributes:true,extractStyles:false,internalns:null,features:null,styles:null,styleBase
s*|\s*$/g,removeSpace:/\s*/g,splitSpace:/\s+/,trimComma:/\s*,\s*/g,kmlColor:/(\w{2})(\w{2})(\w{2})(\w{2})/,kmlIconPalette:/r
media/js/OpenLayers.js:"*","scale")||1);d=32*h;i=32*h;var j=this.getElementsByTagNameNS(styleTypeNode,"*","Icon")[0];if(j){v
=this.parseProperty(j,"*","h"),n="http://maps.google.com/mapfiles/kml";if(OpenLayers.String.startsWith(l,n)&&!g&&!k){k=g=64;