Skip to content

Instantly share code, notes, and snippets.

View ycombinator's full-sized avatar

Shaunak Kashyap ycombinator

  • Elastic
  • San Jose, CA
View GitHub Profile
<?php
/*
* Copyright 2014 Rackspace US, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
curl -v -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_TOKEN" \
"https://dfw.orchestration.api.rackspacecloud.com/v1/$OS_TENANT_ID/stacks" \
-d '
{
"stack_name": "Minecraft server",
"template_url": "https://raw.githubusercontent.com/rackspace-orchestration-templates/minecraft/master/minecraft-server.yaml",
#!/bin/bash
curl -v -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_AUTH_TOKEN" \
"https://dfw.orchestration.api.rackspacecloud.com/v1/$OS_TENANT_ID/stacks" \
-d '
{
"stack_name": "minecraft_server",
"template_url": "https://raw.githubusercontent.com/rackspace-orchestration-templates/minecraft/master/minecraft-server.yaml",
#!/bin/bash
curl -v -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: $OS_AUTH_TOKEN" \
"https://dfw.orchestration.api.rackspacecloud.com/v1/$OS_TENANT_ID/stacks" \
-d '
{
"stack_name": "minecraft_server",
"template_url": "https://raw.githubusercontent.com/rackspace-orchestration-templates/minecraft/master/minecraft-server.yaml",
{
"stack_name": "my_minecraft_server",
"template_url": "https://raw.githubusercontent.com/rackspace-orchestration-templates/minecraft/master/minecraft-server.yaml",
"parameters": {
"terms": true
},
"timeout_mins": 5
}
var pkgcloud = require('pkgcloud')
// Connect to Rackspace Cloud
var rackspaceClient = pkgcloud.storage.createClient({
provider: 'rackspace',
username: process.env.RAX_USERNAME,
apiKey: process.env.RAX_API_KEY,
region: process.env.RAX_REGION
})
from subprocess import Popen
import os
import random
import sys
from flask import (Flask, request, session, g, redirect, url_for, abort,
render_template, flash)
from flask.ext.sqlalchemy import SQLAlchemy
diff --git a/givemeaserver.py b/givemeaserver.py
old mode 100644
new mode 100755
diff --git a/iwantaserver/__init__.py b/iwantaserver/__init__.py
index ced0731..e7e867e 100644
--- a/iwantaserver/__init__.py
+++ b/iwantaserver/__init__.py
@@ -55,59 +55,49 @@ class Server(db.Model):
self.password = password
self.event_id = event_id
@ycombinator
ycombinator / gist:a8d9d758ceed00425f45
Last active August 29, 2015 14:10
Using composer to install php-opencloud
$ php composer.phar require rackspace/php-opencloud
Using version ~1.11 for rackspace/php-opencloud
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/event-dispatcher (v2.6.0)
Loading from cache
--------------------------
Document (before): {}
Patch: [{"path": "/domains", "value": [{"domain": "addDomainList.com", "protocol": "http"}], "op": "add"}]
Document (after): {"domains": [{"domain": "addDomainList.com", "protocol": "http"}]}
--------------------------
Document (before): {"domains": []}
Patch: [{"path": "/domains", "value": [{"domain": "addDomainList.com", "protocol": "http"}], "op": "add"}]
Document (after): {"domains": [{"domain": "addDomainList.com", "protocol": "http"}]}
--------------------------
Document (before): {"domains": [{"domain": "existingDomain.com"}]}