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 requests | |
| from requests.auth import HTTPBasicAuth | |
| import json | |
| import sys | |
| server = "http://fall.local" | |
| auth = HTTPBasicAuth('username', 'password') | |
| #get this from somewhere else, this is just an example , maybe from sys.argv[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
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; |
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
| C:\Documents and Settings\Synthego\My Documents\Downloads\pyzmq-ironpython-backend\pyzmq-ironpython-backend>ipy setup.py install --user | |
| running configure | |
| Found zmq at: C:\Program Files\ZeroMQ 4.0.4 | |
| ************************************************ | |
| Configure: Autodetecting ZMQ settings... | |
| Custom ZMQ dir: C:\Program Files\ZeroMQ 4.0.4 | |
| error: IronPython.Runtime.Exceptions.OSException: cannot load library C:\Program Files\ZeroMQ 4.0.4\bin\libzmq-v110-mt-4_0_4.dll | |
| at IronPython.Modules.CTypes.LoadLibrary(String library, Int32 mode) | |
| at Microsoft.Scripting.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame frame) |
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
| C:\Documents and Settings\Synthego\My Documents\Downloads\pyzmq-ironpython-backend\pyzmq-ironpython-backend>ipy -X:FullFrames setup.py install --user | |
| running configure | |
| Found zmq at: C:\Program Files\ZeroMQ 4.0.3 | |
| ************************************************ | |
| Configure: Autodetecting ZMQ settings... | |
| Custom ZMQ dir: C:\Program Files\ZeroMQ 4.0.3 | |
| ZMQ version detected: 4.0.3 | |
| Warning: Detected ZMQ version: 4.0.3, but pyzmq targets ZMQ 4.0.4. | |
| Warning: libzmq features and fixes introduced after 4.0.3 will be unavailable. | |
| ************************************************ |
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
| synthego@graphs:~/synthesize$ sudo ./install | |
| [sudo] password for synthego: | |
| +++ dirname ./install | |
| ++ cd . | |
| ++ pwd | |
| + SYNTHESIZE_HOME=/home/synthego/synthesize | |
| ++ cut -s -f 2 | |
| ++ grep '^Descrip' | |
| ++ lsb_release -a | |
| + UBUNTU_RELEASE='Ubuntu 14.04.2 LTS' |
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
| root@backbone:/etc# pip uninstall shinken | |
| Uninstalling Shinken-2.4: | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/DESCRIPTION.rst | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/METADATA | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/RECORD | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/WHEEL | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/metadata.json | |
| /usr/local/lib/python2.7/dist-packages/Shinken-2.4.dist-info/top_level.txt | |
| /usr/local/lib/python2.7/dist-packages/etc/init.d/shinken | |
| /usr/local/lib/python2.7/dist-packages/etc/init.d/shinken-arbiter |
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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
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
| <html> | |
| <body> | |
| <script> | |
| var myWebSocket = new WebSocket("ws://127.0.0.1:8080/ws/echo"); | |
| myWebSocket.onopen = function(evt) { | |
| alert("Connection open ..."); | |
| }; | |
| myWebSocket.onmessage = function(evt) { |
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
| from twisted.internet import reactor | |
| from twisted.web.websocket import WebSocketHandler, WebSocketResource | |
| from twisted.web.server import Site | |
| from twisted.web.static import File | |
| class Echohandler(WebSocketHandler): | |
| def frameReceived(self, frame): | |
| self.sendFrame(frame) |
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
| //Find the full url to the site we are at | |
| $protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; | |
| $address = $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
| $currentFile = $_SERVER["SCRIPT_NAME"]; | |
| $parts = Explode('/', $currentFile); | |
| $currentFile = $parts[count($parts) - 1]; | |
| $site_path = str_replace($currentFile,'',$address); |
OlderNewer