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
| rules: | |
| # Inspired by this rule: https://github.com/Skyscanner/sonar-secrets/blob/v1.3.0/java/src/main/java/org/sonar/skyscanner/java/checks/PrivateKeys.java | |
| - id: review.sider.general.security.private_keys | |
| pattern: | |
| - "-----BEGIN RSA PRIVATE KEY-----" | |
| - "-----BEGIN DSA PRIVATE KEY-----" | |
| - "-----BEGIN EC PRIVATE KEY-----" | |
| - "-----BEGIN OPENSSH PRIVATE KEY-----" | |
| - "-----BEGIN PRIVATE KEY-----" | |
| message: Do not put private keys in this repository. |
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
| /* | |
| * DataGrip extension to export results to markdown. | |
| * The markdown table format is supported by Github and Jira. I haven't tested others. | |
| * | |
| * Tested on DataGrip 2016.2.2 | |
| * - Open the File view. View -> Tool Windows -> Files | |
| * - Activate the "Scratches" tab. You should see "Files", "Scopes", and "Scratches". | |
| * - Copy this file to Extensions/Database Tools and SQL/data/extractors/Markdown.JavaScript.md.js | |
| * - Run a query with some results. | |
| * - Change the export format to Markdown.JavaScript.md.js and click "To Clipboard". |
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
| { | |
| "quotes": [ | |
| { | |
| "quote":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"}, | |
| { | |
| "quote":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"}, | |
| { | |
| "quote":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"}, | |
| { |
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
| #some grep pattern | |
| pattern=192.168 | |
| # save latest n images | |
| n=1 | |
| # check first (?): | |
| # docker inspect -f '{{ .Created }} {{ .Id }} {{ .RepoTags }}' $(docker images | tail -n+2 | sed 's/^\([^ ]*\) *\([^ ]*\) *\([^ ]*\).*/ \1:\2 \3 /' | grep $pattern | cut -d' ' -f3) | sort -r | tail -n+$((n+1)) | |
| docker rmi $(docker inspect -f '{{ .Created }} {{ .Id }}' $(docker images | tail -n+2 | sed 's/^\([^ ]*\) *\([^ ]*\) *\([^ ]*\).*/ \1:\2 \3 /' | grep $pattern | cut -d' ' -f3) | sort -r | tail -n+$((n+1)) | cut -d' ' -f2 | cut -c8-) |
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
| #ifdef SHELL | |
| gcc -Wall -Werror $0 && ./a.out | |
| exit $? | |
| #endif | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> |
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 ubuntu | |
| RUN apt-get update | |
| RUN apt-get install -y socat | |
| VOLUME /foo | |
| CMD socat UNIX-LISTEN:/foo/bar.sock - |
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
| require 'rdoc' | |
| converter = RDoc::Markup::ToMarkdown.new | |
| rdoc = File.read(ARGV[0] || 'README.rdoc') | |
| puts converter.convert(rdoc) | |
| # ruby rdoc2md.rb > README.md | |
| # ruby rdoc2md.rb ABC.rdoc > abc.md |
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
| Overview | |
| ======== | |
| Students in my Web Programming class (G. Brown, S. Prassad, et al) | |
| discovered that MongoDB request injection attacks also work on Node.js | |
| + Express web applications. MongoDB request injection attacks have | |
| been known for PHP web applications. | |
| Impact | |
| ====== | |
| Attacker can view and download all the data in a MongoDB database |
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 the ROOM_ID & AUTH_TOKEN variables below. | |
| # Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
| ROOM_ID=XXX | |
| AUTH_TOKEN=XXX | |
| MESSAGE="Hello world!" | |
| curl -H "Content-Type: 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 | |
| # | |
| # Converts LDIF data to CSV. | |
| # Doesn't handle comments very well. Use -LLL with ldapsearch to remove them. | |
| # | |
| # 2010-03-07 | |
| # dsimmons@squiz.co.uk | |
| # | |
| # Show usage if we don't have the right params |
NewerOlder