| 更新: | 2024-10-08 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
| on write_to_file(this_data, target_file, append_data) | |
| try | |
| set the target_file to the target_file as string | |
| set the open_target_file to open for access file target_file with write permission | |
| if append_data is false then set eof of the open_target_file to 0 | |
| write this_data to the open_target_file starting at eof | |
| close access the open_target_file | |
| return true | |
| on error | |
| try |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| "os" | |
| "golang.org/x/net/html" |
| 更新: | 2024-10-08 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
| function peco_select_rake_task_all() { | |
| local tasks="bundle exec rake -AT" | |
| task=$(eval $tasks | peco --query "$LBUFFER" ) | |
| task_split=("${(s/ /)task}") | |
| BUFFER=$task_split[1,2] | |
| CURSOR=$#BUFFER | |
| zle -R -c | |
| } | |
| zle -N peco_select_rake_task_all |
| # 私が考える安全なプログラムを書くために必要なこと | |
| 今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
| - ファイルを開こうとしたらコマンドを実行できてしまったり | |
| - CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
| - SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
| こういったときに | |
| - 入力値検証をしないと危険になる |
| " vim-automatic | |
| let g:automatic_config = [ | |
| \ { | |
| \ "match" : { | |
| \ "filetype" : "help", | |
| \ "buftype" : "help", | |
| \ }, | |
| \ "set" : { | |
| \ "height" : "50%", | |
| \ "move" : "bottom", |
| #!/usr/bin/env ruby | |
| # README | |
| # | |
| # Generate the Hosts Dynamically | |
| # ============================== | |
| # | |
| # Usage | |
| # ----- | |
| # |