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
    
  
  
    
  | To kill stuck processes | |
| select group_concat(concat('KILL ',id,';') separator ' ') | |
| from information_schema.processlist | |
| where Time>'100' and Info like 'select %'; | |
| To kill sleeping processes and allow alter table to occur | |
| select group_concat(concat('KILL ',id,';') separator ' ') | |
| from information_schema.processlist | 
  
    
      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 boto3 | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument( | |
| '--repo', metavar='repo', type=str, | |
| help='Optionally filter by repository') | |
| args = parser.parse_args() | 
  
    
      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 python3 | |
| import subprocess | |
| import zipfile | |
| import os | |
| dirs = next(os.walk('.'))[1] | |
| for d in dirs: | |
| print("Preparing {} ZIP archive".format(d)) | 
  
    
      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 | |
| BRANCH=`git rev-parse --abbrev-ref HEAD` | |
| if [[ "$BRANCH" == "master" ]]; then | |
| ./deploy.sh | |
| 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
    
  
  
    
  | " Display a red column 80 chars in .py files (to assist with line length) | |
| " set colorcolumn=80 | |
| autocmd FileType python setlocal colorcolumn=80 | |
| " Return to last edit position when opening files | |
| autocmd BufReadPost * | |
| \ if line("'\"") > 0 && line("'\"") <= line("$") | | |
| \ exe "normal! g`\"" | | |
| \ endif | 
  
    
      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
    
  
  
    
  | Description: API Gateway to JSON payloads and send to SQS | |
| Outputs: | |
| ApiEndpoint: | |
| Description: Endpoint for this stage of the api | |
| Value: !Join | |
| - '' | |
| - - https:// | |
| - !Ref 'SQSProxy' | |
| - .execute-api.ap-southeast-2.amazonaws.com/ | |
| - prod | 
  
    
      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 convert(minutes): | |
| if isinstance(minutes, int): | |
| return str(minutes/24/60) + " day, " + \ | |
| str(minutes/60 % 24) + " hours, " + \ | |
| str(minutes % 60) + " minutes" | |
| else: | |
| return "0 days, 0 hours, 0 minutes" | |
  
    
      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 merge(r): | |
| if '{{LESSOR}}' in r.text: | |
| r.text = r.text.replace('{{LESSOR}}', 'my name') | |
| if '{{LESSORADDRESS}}' in r.text: | |
| r.text = r.text.replace('{{LESSORADDRESS}}', 'my address') | |
| from docx import 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
    
  
  
    
  | switch() { | |
| export AWS_DEFAULT_PROFILE=$1 | |
| PS1="\h:\W \u\$ ($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
    
  
  
    
  | # This file is: ~/.ssh/config | |
| # You may have other (non-CodeCommit) SSH credentials stored in this | |
| # config file – in addition to the CodeCommit settings shown below. | |
| # NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
| # Credentials for Account1 | |
| Host awscc-account1 # 'awscc-account1' is a name you pick | |
| Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |