- curl -o [文件名] url
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<input type="button" id="test" value="clickme" /> | |
<div id="output" ></div> | |
<table id="test_table"> | |
<tr><td>test1</td></tr> | |
<tr><td>test2</td></tr> |
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
alfred://customsearch/Mozilla%20Developer%20Network%20Search/mdn/utf8/plus/https://developer.mozilla.org/en-US/search?q={query} |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Data::UUID; | |
use DBI; | |
use HTTP::Request::Common; | |
use LWP::Simple; |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var url = 'https://www.costco.com.tw/Baby-Care-Kids-Toys/Toys/Infant-%26-Preschool/VTech-Sit-To-Stand-Ultimate-Alphabet-Train/p/105123'; | |
request(url, function(err, res, body){ | |
var $ = cheerio.load(body); | |
var result = $('.stock-status').text().trim(); |
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
# First commit | |
echo "hello" | git hash-object -w --stdin | |
git update-index --add --cacheinfo 100644 ce013625030ba8dba906f756967f9e9ca394464a hello.txt | |
git write-tree | |
git commit-tree aaa96c -m "First commit" | |
git update-ref refs/heads/master 30b060d9a7b5e93c158642b2b6f64b2b758da40d | |
# Second commit |
加入代码审计小密圈: https://wx.xiaomiquan.com/mweb/views/joingroup/join_group.html?group_id=2212251881
代码审计小密圈从去年11月成立至今已有近半年时间,一直没有把我们的宗旨和规则明文写出来,一是我比较懒事儿也比较多,二是我发现大家都是善良的小纯白,并没有谁是揣着恶意来到这里,所以这个事儿也不是特别急。但一直没有成文的规定总不是办法,有的新人进来后,四顾何茫茫,不领要旨,可能会觉得钱花的不值。
办这个圈子,脑子里有几句话,我一直奉为圭臬,在这里说一下。
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
with `react-native`: | |
npm set progress=false && rm -rf ~/.npm && rm -rf node_modules && npm cache clean && time npm install | |
npm install 83.72s user 26.03s system 100% cpu 1:49.32 total | |
npm set progress=true && rm -rf ~/.npm && rm -rf node_modules && npm cache clean && time npm install | |
npm install 199.30s user 27.32s system 91% cpu 4:08.29 total | |
-- |
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
<?php | |
function check_alive($url, $timeout = 10, $successOn = array(200, 301)) { | |
$ch = curl_init($url); | |
// Set request options | |
curl_setopt_array($ch, array( | |
CURLOPT_FOLLOWLOCATION => false, | |
CURLOPT_NOBODY => true, | |
CURLOPT_TIMEOUT => $timeout, |
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
// as property | |
event.currentTarget.dataset.id | |
// as array element | |
event.currentTarget.dataset['id'] | |
// jquery method | |
$(event.currentTarget).data('id') |
OlderNewer