Skip to content

Instantly share code, notes, and snippets.

View spinolacastro's full-sized avatar

Diego Castro (dscastro) spinolacastro

  • Buenos Aires - Argentina
View GitHub Profile
mount { "lib/openshift":
device => "/dev/xvde",
ensure => present,
fstype => "ext4",
options => "defaults,grpquota",
remounts => true,
target => "/var/lib/openshift",
require => Yumrepo["openshift"],
}
#!/bin/bash
# This deploy hook gets executed after dependencies are resolved and the
# build hook has been run but before the application has been started back
# up again. This script gets executed directly, so it could be python, php,
# ruby, etc.
set -e
echo "deploy"
#!/bin/env node
var express = require('express');
var fs = require('fs');
users = require('./routes/users');
companies = require('./routes/companies');
odometers = require('./routes/odometers');
var app = express();
var mongo = require('mongodb');
var Server = mongo.Server,
Db = mongo.Db,
BSON = mongo.BSONPure;
mongourl = process.env.OPENSHIFT_MONGODB_DB_URL;
backend default {
.host = "wp-example.getup.io";
.port = "80";
}
import std;
include "lib/xforward.vcl";
#include "lib/cloudflare.vcl";
include "lib/purge.vcl";
#!/bin/bash
source /etc/profile
CMD_CONSISTENT_SNAPSHOT="/usr/local/bin/ec2-consistent-snapshot.pl"
HOSTNAME=$(hostname -s)
if [ "$#" -ne 3 ]; then
echo -e "USAGE: snapshots DATA_DEVICE DATA_DEVICE_MOUNTPOINT..."
exit 1
else
#!/usr/bin/perl
#
# Copyright (C) 2009-2012 Eric Hammond <[email protected]>
#
use strict;
use warnings;
(our $Prog) = ($0 =~ m%([^/]+)$%);
use Getopt::Long;
use Pod::Usage;
use File::Slurp;
0 */2 * * * root /usr/local/bin/snapshots /dev/xvdb1 /gfsvol
<?
$app_uuid = getenv('OPENSHIFT_APP_UUID');
$app_dns = getenv('OPENSHIFT_APP_DNS');
$sshkey = getenv('OPENSHIFT_HOMEDIR') . ".openshift_ssh/id_rsa";
$sync = "ssh -i $sshkey $app_uuid@$app_dns 'sh <(curl -s https://s3-sa-east-1.amazonaws.com/getup/autodeploy/index.html)'";
exec($sync,$output);
<?php
/**
* Product list template
*
* @see Mage_Catalog_Block_Product_List
*/
?>
<div class="new-products">
<?php $_productCollection=$this->getProductCollection() ?>