You can check here for getting the latest version. Change the wget url to download newer versions.
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
| /** | |
| * 生成签名 | |
| * | |
| * @param array $data | |
| * @return string | |
| */ | |
| function gen_sign(array $data) | |
| { | |
| $arr = array(); | |
| $arr['body'] = $data['body']; |
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 7 中,可以使用 ?? 运算符 | |
| // example: | |
| // return $var ?? ''; | |
| function first_no_null(&$var, $default = '') | |
| { | |
| return !empty($var) ? $var : $default; | |
| } |
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
| function json($status, $data = null, $message = 'success') | |
| { | |
| if (is_null($data)) { | |
| $data = ['status' => $status, 'message' => $message]; | |
| } elseif (is_string($data)) { | |
| $data = ['status' => $status, 'message' => $data]; | |
| } else { | |
| $data = ['status' => $status, 'message' => $message, 'data' => $data]; | |
| } | |
| return json_encode($data); |
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
| // helpers.php | |
| if (!function_exists('get_current_router_bind')) { | |
| function get_current_router_bind_key() { | |
| dd(key(array_reverse(last(last(debug_backtrace(0)[2]))))); | |
| } | |
| } | |
| // UserController | |
| // update(Request $request, User get_current_router_bind_key()) | |
| public function update(Request $request, User $user) |
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
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
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
| <template> | |
| <VueMarkdownEditor | |
| v-model="newModelValue" | |
| :disabled-menus="[]" | |
| :include-level="[1, 2, 3, 4, 5, 6]" | |
| @upload-image="handleUploadImage" | |
| @change="change" | |
| :height="height + 'px'" | |
| :placeholder="placeholder" | |
| > |
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 | |
| # Function to display usage information | |
| usage() { | |
| echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
| exit 1 | |
| } | |
| # Check if at least one argument (input file) is provided | |
| if [ $# -lt 1 ]; then |
OlderNewer