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 alpine:3.22 | |
| RUN apk update && \ | |
| apk upgrade && \ | |
| apk add --no-cache \ | |
| zsh \ | |
| git \ | |
| curl \ | |
| neovim \ | |
| ripgrep \ |
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
| /** | |
| * Example MSSQL Language server support in VS Code | |
| */ | |
| import { LanguageClient, ServerOptions, TransportKind, LanguageClientOptions } from "vscode-languageclient"; | |
| import * as vscode from "vscode"; | |
| let client: LanguageClient; | |
| export async function activate(context: vscode.ExtensionContext) { |
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
| //#region Polyfills & TypeScript utils | |
| if (typeof Object.create !== "function") { | |
| /** | |
| * Polyfill | |
| * {@link https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Object/create#polyfill} | |
| */ | |
| Object.create = (function () { | |
| /** @constructor */ | |
| function Temp() {} |
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
| /** | |
| * @typedef {Object} MyObject | |
| * @property {string} knownProperty - Известное свойство | |
| */ | |
| /** | |
| * @returns {MyObject & { [key: string]: any }} | |
| */ | |
| function createObject() { | |
| const obj = { |
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 'package:flutter/material.dart'; | |
| import 'package:shared_preferences/shared_preferences.dart'; | |
| void main() async { | |
| WidgetsFlutterBinding.ensureInitialized(); | |
| final prefs = await SharedPreferences.getInstance(); | |
| runApp(App( | |
| themeController: ThemeController(prefs), |
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 'package:flutter/material.dart'; | |
| import 'package:freezed_annotation/freezed_annotation.dart'; | |
| import 'package:isar/isar.dart'; | |
| import 'package:path_provider/path_provider.dart'; | |
| part 'test.freezed.dart'; | |
| part 'test.g.dart'; | |
| @freezed | |
| @Collection(ignore: {'copyWith'}) |
import chalk from 'chalk'
import fuzzysort from 'fuzzysort'
const findWord = 'lorem'
const resource = ['lorem ipsum', 'lorei mpsum', 'ipsum dolor', 'ipsum lor', 'losum remip', 'lor', 'loiem iplor']
console.log(
[...fuzzysort.go(findWord, resource.map(a => ({title: a})), { keys: ['title'] })]
.map(a => fuzzysort.highlight(a[0], (m) => chalk.yellow(m)))
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
| const edge = require('edge-js'); | |
| const getProcedures = edge.func('sql', { | |
| source: "SELECT TOP 10 name FROM sys.procedures", | |
| connectionString: "Persist Security Info=False;Integrated Security=true;Initial Catalog=<database>;server=<server>" | |
| }); | |
| const init = async () => { | |
| const res = await new Promise((res, rej) => { | |
| getProcedures(null, function (error, result) { |
NewerOlder