This file contains 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://gist.github.com/PlugFox/320d051c5a393f56f60c3cf080d6171a | |
* https://dartpad.dev/320d051c5a393f56f60c3cf080d6171a?null_safety=true | |
*/ | |
import 'package:flutter/widgets.dart'; | |
@immutable | |
class SettingsScope extends StatefulWidget { | |
final Widget child; |
This file contains 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 'dart:developer' as developer; | |
import 'dart:io'; | |
const _lookupHost = 'example.com'; | |
/// Web servers to check. | |
const _hosts = [ | |
'example.com', | |
'ya.ru', | |
'google.com', |
This file contains 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 fs = require("fs"); | |
const url = require("url"); | |
function fixBitwardenJson() { | |
const filePath = process.argv[2]; | |
if (!filePath || !fs.existsSync(filePath)) return; | |
let jsonData = null; | |
let count = 0; |
This file contains 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'; | |
class CustomTooltip extends StatefulWidget { | |
final String message; | |
final Widget child; | |
const CustomTooltip({Key key, this.child, @required this.message}) | |
: super(key: key); | |
@override |
This file contains 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'; | |
class AllwaysScrollableWithKeepPositionScrollPhysics extends ScrollPhysics { | |
final double? Function(double)? _onGetScrollPosition; | |
const AllwaysScrollableWithKeepPositionScrollPhysics( | |
{ScrollPhysics? parent, double? Function(double)? onGetScrollPosition}) | |
: _onGetScrollPosition = onGetScrollPosition, | |
super(parent: parent); |
This file contains 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 'dart:math' as math; | |
import 'package:flutter/gestures.dart' show DragStartBehavior; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
class SingleChildWithKeepPositionScrollView extends StatelessWidget { | |
/// Creates a box in which a single widget can be scrolled. | |
const SingleChildWithKeepPositionScrollView({ | |
super.key, |
This file contains 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
/** @jsxRuntime classic */ | |
/** @jsx jsx */ | |
import { jsx } from '@keystone-ui/core' | |
import { FC } from 'react' | |
import styles from './styles' | |
import { IImageUploaderProps } from './types' | |
import useBase from './useBase' | |
export const ImageUploader: FC<IImageUploaderProps> = (props) => { |
This file contains 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
#customScroll::-webkit-scrollbar { width: 4px; height: 4px;} | |
#customScroll::-webkit-scrollbar-track { background-color: #999;} | |
#customScroll::-webkit-scrollbar-track-piece { background-color: #ffffff;} | |
#customScroll::-webkit-scrollbar-thumb { height: 50px; background-color: #666; border-radius: 3px;} | |
#customScroll::-webkit-scrollbar-corner { background-color: #999;} | |
#customScroll::-webkit-resizer { background-color: #666;} |
This file contains 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 'dart:convert'; | |
import 'dart:typed_data'; | |
import "package:pointycastle/export.dart"; | |
import "./convert_helper.dart"; | |
// AES key size | |
const KEY_SIZE = 32; // 32 byte key for AES-256 | |
const ITERATION_COUNT = 1000; |
This file contains 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 aeslib | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"crypto/sha256" | |
"encoding/base64" | |
"errors" |
NewerOlder