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 | |
| # Write to /usr/local/ec2/ec2-hostname.sh | |
| # Execute chmod 755 ec2-hostname.sh | |
| # Append /usr/local/ec2/ec2-hostname.sh to /etc/rc.local | |
| # Referenced: http://ternarylabs.com/2010/09/15/automatically-configure-hostname-for-new-ec2-instances/ | |
| USER_DATA=`/usr/bin/curl -s http://169.254.169.254/latest/user-data` | |
| IPV4=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/public-ipv4` |
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 | |
| interface UbiquitousLanguage | |
| { | |
| public function enter(BoundedContext $boundedContext); | |
| } | |
| interface BoundedContext | |
| { | |
| public function getNames(); |
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 | |
| require_once __DIR__ . '/stupidStringComparison.php'; | |
| class HashCracker | |
| { | |
| private $range = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; | |
| private $length = 32; | |
| private $cycles = 1000; |
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
| sudo -u postgres psql postgres | |
| # \password postgres | |
| Enter new password: |
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
| untitled text 3.txt | |
| untitled text 31.txt | |
| #!/usr/bin/env python | |
| import boto | |
| import argparse | |
| import time, datetime, sys, logging, socket, re | |
| from dateutil.relativedelta import relativedelta | |
| def get_creds(): |
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 | |
| namespace MyModule; | |
| use Zend\ServiceManager\AbstractFactoryInterface; | |
| use Zend\ServiceManager\ServiceLocatorInterface; | |
| use Zend\ServiceManager\AbstractPluginManager; | |
| class AbstractEntityControllerFactory implements AbstractFactoryInterface | |
| { |
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
| dependencies[] = ctools | |
| ; Views Handlers | |
| files[] = views/mymodule_handler_handlername.inc |
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 groovy | |
| import groovy.json.JsonSlurper | |
| import java.text.SimpleDateFormat | |
| // fetches a Github API URL and parses the result as JSON | |
| def fetch(addr, params = [:]) { | |
| def auth = "<personal api token>" | |
| def json = new JsonSlurper() | |
| return json.parse(addr.toURL().newReader(requestProperties: ["Authorization": "token ${auth}".toString(), "Accept": "application/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 | |
| # | |
| # User data script which sets up Jenkins on Ubuntu using Puppet | |
| # | |
| # For example: | |
| # | |
| # $ ec2-run-instances ami-5a19976a -t m1.small --region us-west-2 \ | |
| # --key ec2-keypair --user-data-file Desktop/jenkins-user-script.sh | |
| # $ ssh -i ~/.ssh/ec2-keypair-us-west-2 \ | |
| # [email protected] |