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
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| typeset -g POWERLEVEL9K_INSTANT_PROMPT=off | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| # If you come from bash you might have to change your $PATH. |
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
| aaron-bond.better-comments | |
| akamud.vscode-theme-onelight | |
| alefragnani.bookmarks | |
| alefragnani.project-manager | |
| alexdauenhauer.catppuccin-noctis | |
| amiralizadeh9480.laravel-extra-intellisense | |
| amodio.toggle-excluded-files | |
| andenetalexander.vim-cheatsheet | |
| ashinzekene.nestjs | |
| asvetliakov.vscode-neovim |
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
| from cmd import Cmd | |
| class SimpleCalc(Cmd): | |
| def do_plus(self, line: str): | |
| params = line.split(' ') | |
| if len(params) == 1: | |
| print('lack of arguments') | |
| return | |
| try: |
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
| extension Encodable { | |
| func encode(with encoder: JSONEncoder = JSONEncoder()) throws -> Data { | |
| return try encoder.encode(self) | |
| } | |
| } | |
| extension Decodable { | |
| static func decode(with decoder: JSONDecoder = JSONDecoder(), from data: Data) throws -> Self { | |
| return try decoder.decode(Self.self, from: 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
| package com.nuvoton.nupowerstation | |
| import com.nuvoton.nupowerstation.model.RequestLogin | |
| import com.nuvoton.nupowerstation.model.ResponseLogin | |
| import io.reactivex.Observable | |
| import retrofit2.Retrofit | |
| import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory | |
| import retrofit2.converter.gson.GsonConverterFactory | |
| import retrofit2.http.Body | |
| import retrofit2.http.HeaderMap |
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
| # Tested with browser command: | |
| # http://127.0.0.1/query.php?ipAddress=127.0.0.1&dbLogin=root&dbPassword=48694062&dbName=SURLMICE_TWEET_apple&sqlCommand=SHOW%20TABLES | |
| # Result | |
| # [{"Tables_in_surlmice_tweet_apple":"2013_07_07"},{"Tables_in_surlmice_tweet_apple":"2014_05_28"},{"Tables_in_surlmice_tweet_apple":"2016_04_28"}] | |
| <?php | |
| $ip_address = $_REQUEST['ipAddress']; | |
| $db_login = $_REQUEST['dbLogin']; | |
| $db_pass = $_REQUEST['dbPassword']; | |
| $db_name = $_REQUEST['dbName']; |
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
| /** | |
| * Code is written in Kotlin on Android Platform | |
| * Uses SpongyCastle rather than BouncyCastle | |
| * | |
| * The use case is described as below. | |
| * | |
| * A embedded C platform device generates a pair of ECDH key with prime256v1 and passes the public part to Android Phone. | |
| * Android phone also generates a pair of ECDH key and exchanges the public part with the device. | |
| * Both of them will then use their own private key and the other's public to count a secret. | |
| * The exchange process will be successfully ended only if the secrets are the same. |