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 | |
| # $1 = 叩く回数 | |
| # $2 = "叩きたいURL" | |
| # 確実に叩きたいのでステータスコードが200じゃなかった分は数を引いています。 | |
| # 落ちてるサーバーに何回もアクセスしてもしょうがないけど今回必要な数だと20秒もあれば終わってしまうので途中で止めなくても良いかなという感じ。 | |
| if [ $# -ne 2 ]; then | |
| echo "引数足りてないです" | |
| elif [ $1 -gt 150 ]; then | |
| echo "悪用はやめましょう" |
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
| val row1 = (11,"asdf","hoge") | |
| val row2 = (2,"basdf","hoge") | |
| val csv = Seq(row1,row2) | |
| csv.sortBy(_._1) | |
| // res0: Seq[(Int, String, String)] = List((2,basdf,hoge), (11,asdf,hoge)) |
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
| <?php | |
| namespace Grav\Plugin\Shortcodes; | |
| use Thunder\Shortcode\Shortcode\ShortcodeInterface; | |
| use Thunder\Shortcode\Shortcode\ProcessedShortcode; | |
| class LinkcardShortcode extends Shortcode { | |
| public function init() { | |
| $this->shortcode->getHandlers()->add('site', function(ProcessedShortcode $sc) { | |
| $url = $sc->getParameter('url'); |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| <?php | |
| // CSS登録 | |
| function register_style(){ | |
| wp_register_style('bootstrap','http://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css'); | |
| wp_register_style('cc','/css/cc.css'); | |
| wp_register_style('sawarabi','https://fonts.googleapis.com/earlyaccess/sawarabimincho.css'); | |
| wp_register_style('ccommons','https://cdn.jsdelivr.net/cc-icons/1.2.1/css/cc-icons.min.css'); //'https://cdnjs.cloudflare.com/ajax/libs/cc-icons/1.2.1/css/cc-icons.min.css' | |
| } | |
| function add_stylesheet(){ | |
| register_style(); |