Skip to content

Instantly share code, notes, and snippets.

View AlexanderShniperson's full-sized avatar
💎
Brilliant developer

Alexander Shniperson AlexanderShniperson

💎
Brilliant developer
  • OrionLab
  • USSR
View GitHub Profile
@AlexanderShniperson
AlexanderShniperson / MinMaxPriceTextInputFormatter.dart
Last active July 29, 2020 13:04
Flutter custom price input formatter for standard TextField
import 'package:flutter/services.dart';
class MaxPriceTextInputFormatter extends TextInputFormatter {
MaxPriceTextInputFormatter({this.maxPrice})
: assert(maxPrice == null || maxPrice > 0);
final double maxPrice;
@override
TextEditingValue formatEditUpdate(
@AlexanderShniperson
AlexanderShniperson / configure.sh
Created February 7, 2019 14:22 — forked from lukicdarkoo/configure.sh
Raspberry Pi: AP + client mode
#!/bin/sh
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3)
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass
# Licence: GPLv3
# Author: Darko Lukic <lukicdarkoo@gmail.com>
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)"
CLIENT_SSID="${1}"
CLIENT_PASSPHRASE="${2}"