Download logstash:
wget https://logstash.objects.dreamhost.com/release/logstash-1.1.5-monolithic.jar
'use strict'; | |
let AWS = require('aws-sdk'); | |
let ec2 = new AWS.EC2({ | |
region: 'ap-southeast-2', | |
}); | |
let params = { | |
DryRun: false, | |
InstanceTypes: [ |
mysql> select * from orders where user_id = 8; | |
+----+---------------------+---------------------+---------+---------------------+-----------------+-----------+---------------------+-------+---------------------+---------------------+----------+---------------------+-----------+----------------+---------------------+--------------------+-----------------+ | |
| id | created_at | updated_at | user_id | when_projected | subscription_id | period_id | when_committed | total | shipping_list_price | is_shipping_vatable | vat_rate | total_excluding_vat | total_vat | order_state_id | shipping_address_id | billing_address_id | delivery_day_id | | |
+----+---------------------+---------------------+---------+---------------------+-----------------+-----------+---------------------+-------+---------------------+---------------------+----------+---------------------+-----------+----------------+---------------------+--------------------+-----------------+ | |
| 3 | 2014-12-12 12:25:44 | 2014-12-16 12:59:0 |
<?php | |
$arr = array( 5, 3, 2, 8, 4, 1 ); | |
$arr_len = count( $arr ); | |
$swap = TRUE; | |
while( $swap ) { | |
$swap = FALSE; | |
for( $i = 0; $i < $arr_len - 1; $i++ ) { | |
if( $arr[$i] > $arr[$i + 1] ) { | |
$tmp = $arr[$i]; | |
$arr[$i] = $arr[$i + 1]; |
Sapphire Radeon HD 6870 1024 MB Graphics Card - £80 | |
GIGABYTE GA-K8N51PVM9-RH motherboard with AMD Athlon 64 3500+ 2.2GHz processor + 2GB RAM - £25 | |
Corsair Builder Series CX 500 Watt ATX/EPS 80 PLUS Bronze Power Supply Unit - £46 | |
No case, no peripherals, no screen | |
OS: CentOS 6.3 x86_64 | |
Total: £151 | |
Hash rate: Approx 300 Mhash/s |
var ipModule = (function() { | |
// Private stuff | |
var my = {}; | |
var options = { | |
hostname: 'jsonip.com' | |
}; | |
// Get the external IP address of this server using the JSON IP server | |
my.getIP = function(cb) { |
<?php | |
try { | |
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass); | |
foreach($dbh->query('SELECT * from FOO') as $row) { | |
print_r($row); | |
} | |
$dbh = null; | |
} catch (PDOException $e) { | |
print "Error!: " . $e->getMessage() . "<br/>"; | |
die(); |
cp -r dir/to/backup backup-$(date +"%Y-%m-%d-%T") |
error_reporting( E_ALL ); | |
ini_set( 'display_errors', '1' ); |