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/jython | |
import sys | |
from org.apache.commons.httpclient.protocol import Protocol | |
from com.vmware.vcloud.sdk import VcloudClient, Organization, Vdc | |
from com.vmware.vcloud.sdk.samples import FakeSSLSocketFactory | |
class VcloudLogin(object): | |
""" | |
VcloudLogin: Login to vcloud class |
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
class IllegalDecoratorArgument(Exception): | |
pass | |
class IllegalPassedType(Exception): | |
pass | |
def check_arg(*fargs): | |
def decorator(target): | |
def wrapper(*args, **kwargs): | |
if len(fargs) != len(args): |
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
diff -uw -L /rsyncc:chmouel@acer:/home/chmouel/.xbmc/addons/script.tv.show.next.aired/resources/lib/scraper.py.order-by -L /rsyncc:chmouel@acer:/home/chmouel/.xbmc/addons/script.tv.show.next.aired/resources/lib/scraper.py /tmp/tramp.10818XFG.order-by /tmp/tramp.10818kPM.py | |
--- script.tv.show.next.aired/resources/lib/scraper.py~ | |
+++ script.tv.show.next.aired/resources/lib/scraper.py | |
@@ -9,10 +9,12 @@ | |
import xbmc | |
import xbmcgui | |
import time | |
+import datetime | |
SOURCEPATH = os.getcwd() |
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/python | |
# -*- encoding: utf-8 -*- | |
# | |
# Chmouel Boudjnah <chmouel@chmouel.com> | |
import os | |
import cloudservers | |
from subprocess import call | |
API_USER="" | |
API_KEY="" |
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/python | |
# -*- encoding: utf-8 -*- | |
__author__ = "Chmouel Boudjnah <chmouel@chmouel.com>" | |
import cloudfiles | |
import tempfile | |
import os | |
FROM_AUTH_USER="" | |
FROM_AUTH_API_KEY="" | |
FROM_CONTAINER="" |
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
__author__ = "Chmouel Boudjnah <chmouel@chmouel.com>" | |
import os | |
import cloudfiles | |
from glance.parallax import db | |
USERNAME = "c" # fill these out for testing | |
API_KEY = "" | |
AUTH_URL = "https://auth.api.rackspacecloud.com/v1.0" |
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
from libcloud.types import Provider | |
from libcloud.providers import get_driver | |
RACKSPACE_USER="USERNAME" | |
RACKSPACE_KEY="API_KEY" | |
Driver = get_driver(Provider.RACKSPACE_LON) | |
conn = Driver(RACKSPACE_USER, RACKSPACE_KEY) | |
print conn.list_nodes() |
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
package com.chmouel.ukcloud.test; | |
import static org.jclouds.rackspace.cloudservers.options.ListOptions.Builder.withDetails; | |
import java.util.Properties; | |
import java.util.Set; | |
import org.jclouds.compute.ComputeServiceContext; | |
import org.jclouds.compute.ComputeServiceContextFactory; | |
import org.jclouds.rackspace.cloudservers.CloudServersClient; |
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
package com.chmouel.ukcloud.test; | |
import java.util.Properties; | |
import org.jclouds.blobstore.BlobStoreContext; | |
import org.jclouds.blobstore.BlobStoreContextFactory; | |
public class Main { | |
public static void main(String[] args) { |
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
# -*- mode: snippet -*- | |
# name: newt | |
# -- | |
${1:TYPE} ${1:$(downcase text)} = new $1(); | |
$0 |