This file contains 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
# Check current DISPLAY value | |
$ echo $DISPLAY | |
:0 | |
# If xclock fails as below the variable is incorrect | |
$ xclock | |
No protocol specified | |
No protocol specified | |
Error: Can't open display: :0 | |
# Find the correct value for the current user session | |
$ xauth list|grep `uname -n` |
This file contains 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
# Omit the path or use just "." to get full current directory differences | |
svn diff -r HEAD local/path/to/resource | |
# So it makes sense to use an alias for example in ~/.bash_profile in a MAC you could add: | |
alias svndiff="svn diff -r HEAD" |
This file contains 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
/* | |
- https-to-https-proxy.js: Tested with Apache as target host | |
- Preconditions: Have key/cert generated as in: | |
openssl genrsa -out key.pem 1024 | |
openssl req -new -key key.pem -out cert.csr | |
openssl x509 -req -days 3650 -in cert.csr -signkey key.pem -out cert.pem | |
*/ |
This file contains 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
ps aux|head -1 | |
# Returns: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
ps axo user,pid,ppid,pcpu,pmem,vsz,rss,tname,stat,start,time,args|head -1 | |
# Returns: USER PID PPID %CPU %MEM VSZ RSS TTY STAT STARTED TIME COMMAND |
This file contains 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
Header unset ETag | |
Header set X-Frame-Options: sameorigin | |
Header set X-XSS-Protection: "1; mode=block" | |
Header set X-Content-Type-Options: nosniff | |
Header set X-WebKit-CSP: "default-src 'self'" | |
Header set X-Permitted-Cross-Domain-Policies: "master-only" | |
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains" |
This file contains 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
# use JSON(default), XML or HTM | |
http://zap/HTML/core/view/alerts/?zapapiformat=HTML&baseurl=http%3A%2F%2Fgoogle.com |
This file contains 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
gsettings set org.gnome.system.proxy mode 'none' | |
gsettings set org.gnome.system.proxy mode 'manual' | |
gsettings set org.gnome.system.proxy.http port 8080 | |
gsettings set org.gnome.system.proxy.http host 0.0.0.0 | |
gsettings set org.gnome.system.proxy.https port 8080 | |
gsettings set org.gnome.system.proxy.https host 0.0.0.0 | |
gsettings set org.gnome.system.proxy ignore-hosts "['']" |
This file contains 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
/** | |
* | |
* See it in action in http://runnable.com/VIHI8AhI-_MpHcsM/multipledatesparser-java | |
* | |
* */ | |
class MultipleDatesParser { | |
public static String stringToDate (String dateToParse) throws java.lang.Exception { | |
String parsedDate = null; | |
java.text.SimpleDateFormat sdf = null; | |
try { |
This file has been truncated, but you can view the full file.
This file contains 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
version: 1.6.0.5 | |
configuration: default top owasp 10 | |
log: ./w3af_gui | |
Starting w3af, running on: | |
Python version: 2.7.3 (default, Feb 27 2014, 19:58:35) [GCC 4.6.3] | |
GTK version: 2.24.10 | |
PyGTK version: 2.24.0 | |
w3af version: | |
w3af - Web Application Attack and Audit Framework | |
Version: 1.6.0.5 |
This file contains 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 mount_smbfs '//domain;[email protected]/path/to/share/' /local/path/to/mounting/point |