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 | |
| if [ $# -eq 1 ]; then | |
| foo=$1 | |
| while [ true ]; do | |
| for (( i=0; i<${#foo}; i++ )); do | |
| letter="${foo:$i:1}" | |
| done |
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 | |
| # check parameters | |
| if [ $# -eq 1 ]; then | |
| linecount=$(cat $1 | wc -l) | |
| echo "the file contains" $linecount "lines" | |
| x=1 | |
| #fist loop over every line for part A of the comparison |
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 | |
| linecount=$(cat /var/log/auth.log | grep -i FAILED | wc -l) | |
| cat /var/log/auth.log | grep -i FAILED > log.aux | |
| x=1 | |
| #invalid users | |
| rm log.aux2 | |
| while [ $x -le $linecount ]; do | |
| flag=0 |
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 bottle import *# or route | |
| import json | |
| app = Bottle() | |
| @app.get('/login') # or @route('/login') | |
| def login(): | |
| return ''' | |
| <form action="/login" method="post"> | |
| Username: <input name="username" type="text" /> | |
| Password: <input name="password" type="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
| package examples.docs | |
| import com.atlassian.applinks.api.ApplicationLink | |
| import com.atlassian.applinks.api.ApplicationLinkService | |
| import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType | |
| import com.atlassian.sal.api.component.ComponentLocator | |
| import com.atlassian.sal.api.net.Request | |
| import com.atlassian.sal.api.net.Response | |
| import com.atlassian.sal.api.net.ResponseException | |
| import com.atlassian.sal.api.net.ResponseHandler |
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 examples.docs | |
| import com.atlassian.applinks.api.ApplicationLink | |
| import com.atlassian.applinks.api.ApplicationLinkService | |
| import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType | |
| import com.atlassian.sal.api.component.ComponentLocator | |
| import com.atlassian.sal.api.net.Request | |
| import com.atlassian.sal.api.net.Response | |
| import com.atlassian.sal.api.net.ResponseException | |
| import com.atlassian.sal.api.net.ResponseHandler |
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 com.atlassian.jira.component.ComponentAccessor | |
| import com.atlassian.mail.Email | |
| import com.atlassian.mail.server.SMTPMailServer | |
| import javax.activation.DataHandler | |
| import javax.activation.FileDataSource | |
| import javax.mail.BodyPart | |
| import javax.mail.Multipart | |
| import javax.mail.internet.MimeBodyPart | |
| import javax.mail.internet.MimeMultipart |