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
if(field.getType().isArray() && field.getType() == String[].class) { | |
if(field.getName() == "SHORTCUT" || field.getName() == "URI") { | |
String[] x = (String []) field.get(field); | |
for(int i = 0; i < x.length; i++) { | |
//Do something | |
} | |
} | |
} |
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
File f = new File(filePath); | |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setDataAndType(Uri.fromFile(f), "application/vnd.android.package-archive"); | |
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
startActivity(intent); |
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
http://www.unspecific.com/nmap/ | |
vi nmap-wrapper.pl --> add $opt_d=3 | |
$ sudo ./bin/nmap-wrapper.pl -v -l 10.0.0.0/24 | |
$ nmap-search.pl -f ./20150320.10.0.0.gnmap port 80 | |
$ nmap-report.pl -p80 -v | |
#html output | |
#nmap has a built in xslt stylsheet in xml output, convert to html |
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
+ cd current | |
+ builtin cd current | |
+ [[ -n '' ]] | |
+ true | |
+ __rvm_do_with_env_before | |
+ [[ -n '' ]] | |
+ [[ -n /usr/local/rvm ]] | |
+ source /usr/local/rvm/scripts/initialize | |
++ : rvm_trace_flag:0 | |
++ (( rvm_trace_flag > 0 )) |
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
#set lots of bash shell ls colors | |
wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/.dircolors | |
echo 'eval $(dircolors -b $HOME/.dircolors)' >> $HOME/.bashrc | |
. $HOME/.bashrc | |
#To set if it was setup correctly | |
dircolors -p |
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
echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches |
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
repo init -u git://server/manifest -b <tag> android-4.1.2_r1 | |
repo sync | |
repo forall -c 'git branch company/branchname" | |
repo forall -c 'git checkout company/branchname" | |
repo forall -c 'git push ssh://cpiekarski@server:29418/$REPO_PROJECT company/branchname:company/branchname' |
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 apt-get install mesa-utils | |
glxinfo | grep OpenGL | |
optirun | grep OpenGL | |
glxsheres64 | |
optirun -vv glxspheres64 | |
lspci | grep NVIDIA | |
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
$ adb shell pm list packages -f | grep com.occipital.panorama | |
package:/data/app-private/com.occipital.panorama-2.apk=com.occipital.panorama | |
$ adb pull /data/app-private/com.occipital.panorama-2.apk ~/tmp |
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
> redis-server | |
> vi ./examples/Rakefile | |
@app_token = '' | |
@app_secret = '' | |
@user_accounts = {:name_one => { :token => '', | |
:secret => '', | |
:filter => ['cubs', '#baseball']}, |