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 ( | |
"database/sql" | |
"github.com/yosida95/orm" | |
"github.com/yosida95/orm/cond" | |
"log" | |
) | |
type Model struct { |
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
language: python | |
env: | |
matrix: | |
- TOXENV="py33" | |
- TOXENV="py34" | |
- TOXENV="coverage" | |
install: | |
- pip install tox | |
- if test "$TOXENV" = "coverage"; then pip install coveralls; fi | |
script: |
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
# -*- coding: utf-8 -*- | |
import json | |
from gntp.notifier import GrowlNotifier | |
from ws4py.client.threadedclient import WebSocketClient | |
IMAGE_NORMAL = 'http://yosida95-ubuntu1/jenkins.png' | |
IMAGE_ONSUCCESS = 'http://yosida95-ubuntu1/success.png' | |
IMAGE_ONFAIL = 'http://yosida95-ubuntu1/error.png' |
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 jsonschema import validate | |
>>> # A sample schema, like what we'd get from json.load() | |
>>> schema = { | |
... "type" : "object", | |
... "properties" : { | |
... "price" : {"type" : "number"}, | |
... "name" : {"type" : "string"}, | |
... }, | |
... } |
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
# -*- coding: utf-8 -*- | |
from jsmapper import ( | |
JSONSchema, | |
Object, | |
Number, | |
String, | |
) | |
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
# -*- coding: utf-8 -*- | |
from jsmapper import ( | |
JSONSchema, | |
Mapping, | |
Number, | |
Object, | |
String, | |
) |
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
# -*- coding: utf-8 -*- | |
from jsmapper import ( | |
JSONSchema, | |
Array, | |
Mapping, | |
Number, | |
Object, | |
String, | |
) |
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
cd $HOME | |
# Stop Zabbix Server (1.8) | |
sudo service zabbix-server stop | |
# Create a backup | |
mkdir ./zabbix-backup | |
mysqldump -uroot -p zabbix > ./zabbix-backup/dump.db | |
sudo cp /etc/zabbix/{apache.conf,zabbix_server.conf} ./zabbix-backup | |
sudo cp -r /etc/zabbix/alert.d ./zabbix-backup |
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 -*- | |
import sys | |
import urllib2 | |
from urllib import urlencode | |
APPTOKEN = YOUR_APPLICATION_TOKEN | |
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
~ ✘╹◡╹✘ dig @m.gtld-servers.net value-domain.com | |
; <<>> DiG 9.8.3-P1 <<>> @m.gtld-servers.net value-domain.com | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39649 | |
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 5, ADDITIONAL: 5 | |
;; WARNING: recursion requested but not available |
OlderNewer