Skip to content

Instantly share code, notes, and snippets.

View imaNNeo's full-sized avatar
🚀
Through The Galaxies

Iman Khoshabi imaNNeo

🚀
Through The Galaxies
View GitHub Profile
class PriceTextInputLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = R.attr.textInputStyle
) : TextInputLayout(context, attrs, defStyleAttr) {
val locale = Locale(LOCALE_LANGUAGE_FA)
override fun onAttachedToWindow() {
@imaNNeo
imaNNeo / main.dart
Created March 24, 2021 14:20
Map custom data for PieChart
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'FlChart Demo',
@imaNNeo
imaNNeo / main.dart
Created March 18, 2021 23:04
BarChart -> show persist tooltip, and change color when click happens on bars.
import 'package:flutter/material.dart';
import 'package:fl_chart/fl_chart.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'FlChart Demo',
import 'package:example/radar_chart/radar_chart_page.dart';
import 'package:example/scatter_chart/scatter_chart_page.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:fl_chart/fl_chart.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@cho0o0
cho0o0 / generateAccesskey.js
Last active June 18, 2024 20:17
Generate Outline access key based on Shadowsocks infomation
const generateAccesskey = (method, password, ip, port) => {
const firstPart = btoa(`${method.toLowerCase()}:${password}`)
const secondPart = `${ip}:${port}`
const accesskey = `ss://${firstPart}@${secondPart}`
return accesskey
}
@slightfoot
slightfoot / swipe_button.dart
Created December 9, 2018 01:02
Flutter Swipe Button Demo
import 'package:flutter/material.dart';
import 'package:flutter/physics.dart';
void main() => runApp(SwipeDemoApp());
class SwipeDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active June 5, 2024 21:05
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@Jawnnypoo
Jawnnypoo / AccelerometerActivity.java
Last active March 25, 2022 22:03
Accelerometer example that shows moving a circle based on accelerometer input.
package com.jawnnypoo.example;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.hardware.Sensor;
import android.hardware.SensorEvent;