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
| # Sample ``localrc`` for user-configurable variables in ``stack.sh`` | |
| # NOTE: Copy this file to the root ``devstack`` directory for it to | |
| # work properly. | |
| # ``localrc`` is a user-maintained setings file that is sourced from ``stackrc``. | |
| # This gives it the ability to override any variables set in ``stackrc``. | |
| # Also, most of the settings in ``stack.sh`` are written to only be set if no | |
| # value has already been set; this lets ``localrc`` effectively override the | |
| # default values. |
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
| #!/usr/bin/env python | |
| #coding:utf-8 | |
| # Author: --<> | |
| # Purpose: | |
| # Created: 2013/7/3 | |
| import sys | |
| import httplib | |
| import json | |
| import urllib |
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
| #!/usr/bin/env python | |
| #coding:utf-8 | |
| # Author: syshack --<[email protected]> | |
| # Purpose: yet another pyddns | |
| # Created: 2013/3/19 | |
| import socket | |
| import httplib, urllib | |
| try: import json | |
| except: import simplejson as json |
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
| #!/bin/bash -e | |
| #Purpose:sync time every 5 minutes | |
| rpm -qi ntpdate >/dev/null 2>&1 | |
| if [ $?!=0 ]; | |
| then yum install ntpdate >/dev/null 2>&1 | |
| if [ $?=0 ]; | |
| path=`whereis -b ntpdate|awk -F": " '{print $2}'` | |
| then echo "*/5 * * * * root $path 10.28.167.2 >/dev/null 2>&1" >>/etc/crontab | |
| echo "Sucess!" | |
| fi |
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
| import libvirt | |
| import time | |
| import threading | |
| def callback(conn, dom, event, detail, opaque): | |
| print "EVENT: Domain %s(%s) %s %s" % (dom.name(), dom.ID(), event, detail) | |
| eventLoopThread = None |
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
| public static void main(String[] args) throws UnsupportedEncodingException, ClientProtocolException, IOException { | |
| JboxClientLoginService jboxClientLogin = new JboxClientLoginService("***", "***"); | |
| JboxMessage loginMsg = jboxClientLogin.login(); | |
| if(!loginMsg.isSuccessful()){return;}; | |
| JboxClientMainService jboxClientUploadFile = new JboxClientMainService(false); |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <malloc.h> | |
| #include <sys/stat.h> | |
| #include <signal.h> | |
| //#include "mongo.h" | |
| #define _(s) s | |
| static size_t filesize(const char *filename) |
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
| #!/usr/bin/python | |
| #### | |
| # 02/2006 Will Holcomb <[email protected]> | |
| # | |
| # This library is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU Lesser General Public | |
| # License as published by the Free Software Foundation; either | |
| # version 2.1 of the License, or (at your option) any later version. | |
| # |
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
| BigInteger.prototype.Clamp = bnpClamp; | |
| function bnpClamp() { | |
| var c = this.s&this.DM; | |
| while(this.t > 0 && this[this.t-1] == c) --this.t; | |
| } | |
| BigInteger.prototype.fromString = bnpFromString; | |
| var this.DB = 28 | |
| var dbits = 28; | |
| BigInteger.prototype.DB = dbits; | |
| BigInteger.prototype.DM = ((1<<dbits)-1); |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct LNode | |
| { | |
| int data; | |
| struct LNode *next; | |
| }LNode,*Node; | |
| typedef struct Hnode | |
| { |