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 | |
# The MIT License (MIT) | |
# Copyright © 2015 Recruit Technologies Co.,Ltd. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
$ServerThreadCode = { | |
$listener = New-Object System.Net.HttpListener | |
$listener.Prefixes.Add('http://+:8008/') | |
$listener.Start() | |
while ($listener.IsListening) { | |
$context = $listener.GetContext() # blocks until request is received | |
$request = $context.Request |
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
/* | |
* Topic Entity | |
*/ | |
@Entity | |
@Table(uniqueConstraints = Array(new UniqueConstraint(columnNames=Array("application_id", "name")))) | |
@NamedQueries(Array( | |
new NamedQuery(name="Topic.findAllByApplication", query="from Topic where application=:application"), | |
new NamedQuery(name="Topic.findByApplicationAndName", query="from Topic where application=:application and name=:name") | |
)) | |
class Topic { |
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
-- | |
-- check_pg_settings.sql | |
-- | |
-- Copyright(C) 2012 Uptime Technologies, LLC. All rights reserved. | |
-- | |
SELECT name, | |
setting, | |
CASE WHEN setting::integer = 4096 THEN 'WARNING: default value (4096=32MB) is too small.' | |
WHEN setting::integer < 65536 THEN 'WARNING: too small. (<65536=512MB)' | |
ELSE 'OK.' |