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
deploy: | |
user.present: | |
- fullname: Deploy | |
- shell: /bin/bash | |
- home: /home/deploy | |
- groups: | |
- deploy | |
ssh_auth: | |
- present |
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
ubuntu@domU-12-31-39-06-8C-30:~$ sudo salt '*' grains.items | |
domU-12-31-39-02-74-91.compute-1.internal: | |
cpu_flags: fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc up rep_good nopl pni ssse3 cx16 sse4_1 hypervisor lahf_lm | |
cpu_model: Intel(R) Xeon(R) CPU E5430 @ 2.66GHz | |
cpuarch: x86_64 | |
defaultencoding: None | |
defaultlanguage: None | |
domain: compute-1.internal | |
fqdn: domU-12-31-39-02-74-91.compute-1.internal | |
gpus: |
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
def rotr(x, n=1, bits=8): | |
while True: | |
x = ((x & 1) << bits-1 | x >> 1) | |
n -= 1 | |
if not n: | |
break | |
return x |
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
<?php | |
// Just a wrapper class for ZMQ PECL extension | |
class ZMQ_Socket { | |
private $_context; | |
private $_socket; | |
private $_connected = 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
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
SAMSUNG 830 Series MZ-7PC128D/AM 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
Intel Xeon E3-1230 V2 Ivy Bridge 3.3GHz (3.7GHz Turbo) 8MB L3 Cache LGA 1155 69W Quad-Core Server Processor BX80637E31230V2 2L218Y30A3539 | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Kingston 8GB 240-Pin DDR3 SDRAM ECC Unbuffered DDR3 1333 (PC3 10600) Server Memory Model | |
Integrated IPMI 2.0 X9SCM-F Winbond KVM/LAN card |
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
ERROR:root:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x0000000009ea86b0> | |
Traceback (most recent call last): | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/ioloop.py", line 421, in _run_callback | |
callback() | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 305, in wrapper | |
callback(*args) | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) |
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 | |
""" | |
Check status of a 3ware RAID and alert using AMAZON SES | |
Requires tw_cli binary | |
http://www.cyberciti.biz/files/tw_cli.8.html | |
Author: Matthew Scragg <[email protected]> | |
""" |
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
def unserialize_session(val): | |
if not val: | |
return | |
session = {} | |
groups = re.split("([a-zA-Z0-9_]+)\|", val) | |
if len(groups) > 2: | |
groups = groups[1:] | |
groups = map(None, *([iter(groups)] * 2)) | |
for i in range(len(groups)): |
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
ERROR:root:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x000000002054c1a8> | |
Traceback (most recent call last): | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/ioloop.py", line 421, in _run_callback | |
callback() | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) | |
File "/usr/local/lib/pypy2.7/dist-packages/tornado/iostream.py", line 305, in wrapper | |
callback(*args) | |
File "/usr/lib/pypy/lib_pypy/_functools.py", line 22, in __call__ | |
return self.func(*(self.args + fargs), **fkeywords) |
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 tornado.web import create_signed_value, decode_signed_value | |
secret = 'blah' | |
val = create_signed_value(secret, 'foo', 'bar') | |
print val | |
print decode_signed_value(secret, 'foo', val) |