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
| # Meme++: A Langugae For The Moment | |
| ## Control Structures | |
| ### iDontOften/butWhenIDo | |
| Evaluates BLOCK when CONDITION is TRUE | |
| ``` | |
| iDontOften BOOLEAN_CONDITION |
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 fabric.api import * | |
| # Keyfile for SSH. Use this if you're not | |
| # using SSH Agent. | |
| env.key_filename = "~/.ssh/hpcompute.pem" | |
| @task | |
| def hello(): | |
| puts("Hello") |
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 fabric.api import * | |
| import re | |
| @task | |
| def create_server(name): | |
| """Create a new HP Cloud server.""" | |
| image = 81078 # Ubuntu 12.04 in AZ-1 | |
| flavor = 100 # extra-small | |
| security_group = 'Web' | |
| key = 'hpcompute' |
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
| $xml = '<?xml version="1.0"?> | |
| <root> | |
| <Document name="A" title="A" > | |
| <Document name="B" title="B" > | |
| <Document name="C" title="C" > | |
| <Section title="1" position="" > | |
| Section ABDFD | |
| </Section> | |
| </Document> | |
| </Document> |
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
| #cloud-config | |
| # Automatically update all of the packages | |
| package_upgrade: true | |
| package_reboot_if_required: true | |
| # Install the LAMP stack for me | |
| packages: | |
| - apache2 | |
| - mysql-server |
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
| /* hpcloud */ | |
| import "hpcloud/objectstorage" | |
| type Account struct { | |
| // Stuff | |
| } | |
| func (a Account) ObjectStorage(region) { | |
| /* Look up the endpoints and stuff... |
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
| # kibana.conf# kibana - log viewer | |
| # | |
| description "Kibana logstash viewer" | |
| start on virtual-filesystems | |
| stop on runlevel [06] | |
| respawn | |
| respawn limit 5 30 |
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 | |
| /** | |
| * Object hashing tests. | |
| */ | |
| $sos = new SplObjectStorage(); | |
| $docs = array(); | |
| $iterations = 100000; | |
| for ($i = 0; $i < $iterations; ++$i) { |
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
| package main; | |
| import ( | |
| "fmt" | |
| ); | |
| func main() { | |
| var m = make(map[string]interface{}) | |
| mf := new(MonkeyFace) |
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 | |
| //define('QP_NO_AUTOLOADER', TRUE); | |
| require 'src/qp.php'; | |
| function examples_qptest() { | |
| $qp = qp("<?xml version=\"1.0\" encoding=\"UTF-8\"?><root/>"); | |
| $i = 0; | |
| while ($i < 200) { | |
| $issuerType = rand() ? 'type1' : 'type2'; | |
| $firstName = md5(rand(0,100000)); |