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
笔者工作中使用的主力机器是 MacBookPro, 系统是 Yosemite. 下面简介在 Yosemite中安装Metasploit Framework. | |
## Install Commandline for XCode | |
``` | |
xcode-select --install | |
``` | |
## Install Java7 SDK & JRE | |
``` | |
http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-macosx-x64.dmg |
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
[SQLMap](http://sqlmap.org/) 是一个 SQL Injection 的工具. 下载到 Mac 中时, 由于 PATH 变量没有这个 path, 我们每次使用的时候都需要进到 sqlmap 的 folder, 才能调用, 这比较费时. | |
笔者使用的是 oh-my-zsh, 需要修改的文件为`~/.zshrc`, | |
**oh-my-zsh** | |
``` | |
"echo 'export PATH=/path/to/sqlmap:$PATH' >> ~/.zshrc" | |
``` |
This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one
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
<script type="text/javascript"><!-- | |
var option_value_row = 11; | |
function addOptionValue(option_row) { | |
html = '<tbody id="option-value-row' + option_value_row + '">'; | |
html += ' <tr>'; | |
html += ' <td class="left"><select name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][option_value_id]">'; | |
html += $('#option-values' + option_row).html(); | |
html += ' </select><input type="hidden" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][product_option_value_id]" value="" /></td>'; | |
html += ' <td class="right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="" size="3" /></td>'; |
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
<div>Dinosaur with Grass and clouds</div> |
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
'将单元格区域插入到一个表的最后 | |
Sub AddRow(sht As Worksheet, rg As Range) | |
Dim shtrn As Integer | |
Dim rn, cn As Integer | |
shtrn = sht.Range("A1").CurrentRegion.Rows.Count | |
rn = rg.Rows.Count | |
cn = rg.Columns.Count | |
rg.Copy sht.Range("A1").Offset(shtrn, 0).Resize(rn, cn) | |
End Sub |
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
Option Explicit | |
Private mlRecordID As Long | |
Private mlParentPtr As Long | |
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _ | |
(dest As Any, Source As Any, ByVal bytes As Long) | |
Private msDte As String | |
Private msClient As String | |
Private msName As String |
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
Sub ImportLargeFile(i As Integer) | |
'Imports text file into Excel workbook using ADO. | |
'If the number of records exceeds 65536 then it splits it over more than one sheet. | |
Dim strFilePath As String, strFilename As String, strFullPath As String | |
Dim lngCounter As Long | |
Dim oConn As Object, oRS As Object, oFSObj As Object | |
'Get a text file name | |
strFullPath = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please selec text 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
<!DOCTYPE html><html lang="en"><body><script> | |
var myObject = {}; | |
var myFunction = function(param1, param2) { | |
//setviacall()'this'points to my Object when function is invoked | |
this.foo = param1; | |
this.bar = param2; | |
console.log(this); //logs Object{foo = 'foo', bar = 'bar'} | |
}; | |
myFunction.call(myObject, 'foo', 'bar'); // invoke function, set this value to myObject | |
console.log(myObject) // logs Object {foo = 'foo', bar = 'bar'} |
NewerOlder