This file contains hidden or 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 tornado import gen | |
import tornado.testing | |
import motor | |
class MyTestCase(tornado.testing.AsyncTestCase): | |
def test_thing(self): | |
client = motor.MotorClient('localhost', 27017, io_loop=self.io_loop) | |
client.open_sync() |
This file contains hidden or 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
<block type="cms/block" name="block_name"> | |
<action method="setBlockId"><id>block_code</id></action> | |
</block> | |
{{block type="cms/block" block_id="block_code"}} | |
{{block type="catalog/product_list" category_id="79" template="catalog/product/list_random.phtml"}} |
This file contains hidden or 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
sudo make modules_install | |
sudo mkinitcpio -k 3.18.0-rc5-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-3.18.0-rc5.img | |
make bzImage | |
sudo cp arch/x86/boot/bzImage /boot/vmlinuz-linux-3.18.0-rc5 | |
sudo cp System.map /boot/ |
This file contains hidden or 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
<?php | |
/** | |
* Get the recurring cost of a single server or all servers on your account. | |
* | |
* Perform two operations: | |
* 1) Get a list of servers on a SoftLayer account along with their recurring | |
* monthly costs. We can get that by calling getHardware() in the | |
* SoftLayer_Account API service with an object mask to retrieve cost. | |
* 2) Get the cost for a single server by calling getCost() in the | |
* SoftLayer_Hardware_Server service. |
This file contains hidden or 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
module MyData | |
(MetricUnit(..), | |
ImperialUnit(..), | |
Measurement(..), | |
convert) | |
where | |
data MetricUnit = Meter | |
| Liter |
This file contains hidden or 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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
This file contains hidden or 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
<tr ng-repeat="ahm in ahms"> | |
<td> | |
<input type="checkbox" ng-model="ahm.selected"> | |
</td> | |
<td> | |
<a href="#/nagios/[[appid]]/ahm/[[ahm.host.pub_ip]]"> | |
[[ahm.host.hostname]]-[[ahm.host.pub_ip]] | |
</a> | |
</td> | |
<td> |
This file contains hidden or 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
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
This file contains hidden or 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
for f in `ls *`; do | |
cp $f `echo $f|cut -d. -f1`.cfg | |
done |
This file contains hidden or 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
ELEXOPS.factory("gservice", function($http, $window){ | |
var gamesPromise; | |
var httpGet = function(url) { | |
return $http.get(url).then( | |
function(resp){ | |
return resp.data; | |
}, | |
function(error){ | |
$window.alert("Http Get Error: " + error); | |
}); |