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
| import java.util.Iterator; | |
| import java.util.Map; | |
| import java.util.TreeMap; | |
| import javax.net.ssl.SSLServerSocketFactory; | |
| public class Ciphers | |
| { | |
| public static void main(String[] args) | |
| throws Exception | |
| { |
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
| # usage: powershell -ExecutionPolicy Bypass -file .\sqlite_backup.ps1 -dbFile .\tobackup.db3 -backupDir .\backup | |
| # please make sure sqlite3.exe can be found in $PATH or specify it by -sqliteExe parameter | |
| Param( | |
| # https://chocolatey.org/packages/sqlite.shell | |
| [string]$sqliteExe = "sqlite3.exe", | |
| [Parameter(Mandatory = $true)] | |
| [string]$dbFile, | |
| # default same as dbFile's directory | |
| [string]$backupDir = "", | |
| # [default|fullday|fulltime] |
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
| using System; | |
| using System.IO; | |
| using System.Text.Json; | |
| namespace Microsoft.Extensions.FileProviders; | |
| public static class FileProviderExtensions | |
| { | |
| public static Stream ReadAsStream(this IFileProvider fileProvider, string 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
| namespace System.Linq.Expressions | |
| { | |
| public static class ExpressionExtensions | |
| { | |
| public static Expression<Func<T,bool>> And<T>(this Expression<Func<T,bool>> left, Expression<Func<T, bool>> right) | |
| { | |
| if (left == null) return right; | |
| var and = Expression.AndAlso(left.Body, right.Body); | |
| return Expression.Lambda<Func<T, bool>>(and, left.Parameters.Single()); | |
| } |
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
| using System.Collections.Generic; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| namespace System.Net.Http | |
| { | |
| /// <summary> | |
| /// alternative <see cref="FormUrlEncodedContent"/> implementation that support large context | |
| /// to prevent <see cref="UriFormatException"/> Invalid URI: The Uri string is too long. error | |
| /// </summary> |
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 | |
| ################################################################################ | |
| # FUNCTIONS | |
| ################################################################################ | |
| # 1. Check required system tools | |
| _check_installed_tools() { | |
| local missed="" |
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
| # http://EditorConfig.org | |
| # top-most EditorConfig file | |
| root = true | |
| # Default settings: | |
| # A newline ending every file | |
| # Use 4 spaces as indentation | |
| [*] | |
| charset = utf-8 |
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
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Data.SQLite; | |
| using System.Linq; | |
| public static class ClearSQLiteCommandConnectionHelper | |
| { | |
| private static readonly object lockObject = new object(); | |
| private static readonly List<SQLiteCommand> OpenCommands = new List<SQLiteCommand>(); |
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
| # https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles | |
| # PowerShell < 6 on Windows: $Home\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
| # PowerShell >= 6 on Windows: $Home\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 | |
| # PowerShell on Linux/macOS: ~/.config/powershell/Microsoft.PowerShell_profile.ps1 | |
| # https://learn.microsoft.com/dotnet/core/tools/dotnet-environment-variables#dotnet_cli_ui_language | |
| $env:DOTNET_CLI_UI_LANGUAGE = 'en-us' | |
| # https://github.com/PowerShell/PSReadLine | |
| if (Get-Command 'Set-PSReadlineKeyHandler' -ErrorAction SilentlyContinue) { |
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
| if (args.length == 0) { | |
| println("Usage: groovy prop2xml.groovy messages.(properties|xml) [format]") | |
| println("read from STDIN: groovy prop2xml.groovy - [format]") | |
| System.exit(0) | |
| } | |
| def input = args[0] == '-' | |
| ? System.in | |
| : new File(args[0]).newInputStream() | |
| def format = args.size() > 1 |