Skip to content

Instantly share code, notes, and snippets.

View umaqs's full-sized avatar
🎯
Focusing

Umair M umaqs

🎯
Focusing
  • London
View GitHub Profile
@umaqs
umaqs / MinMaxAttribute.cs
Created December 4, 2017 14:43 — forked from LotteMakesStuff/MinMaxAttribute.cs
MinMax property drawer for Unity - Add a [MinMax] attribute to a property to draw a useful min/max setting slider.
// NOTE DONT put in an editor folder
using UnityEngine;
public class MinMaxAttribute : PropertyAttribute
{
public float MinLimit = 0;
public float MaxLimit = 1;
public bool ShowEditRange;
public bool ShowDebugValues;
@umaqs
umaqs / bithack.cc
Created May 27, 2019 16:22 — forked from stephenLee/bithack.cc
bit manipulation tricks(collections)
/*
* Reference:
* http://www.quora.com/Computer-Programming/What-are-some-cool-bit-manipulation-tricks-hacks
* http://www.catonmat.net/blog/low-level-bit-hacks-you-absolutely-must-know/
*/
#include <iostream>
#include <string.h>
using namespace std;
@umaqs
umaqs / FilterWords.cs
Created June 3, 2019 00:06
A small program to filter words
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace FilterWords
{
class Program
{
@umaqs
umaqs / main.dart
Last active November 26, 2020 00:47
PageView with scrollable tabs
import 'package:flutter/material.dart';
import 'dart:math';
void main() => runApp(MyApp());
Color get randomColor =>
Colors.primaries[Random().nextInt(Colors.primaries.length)];
class MyApp extends StatelessWidget {
@override
@umaqs
umaqs / main.dart
Last active May 5, 2021 17:38
Centered TextField test
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {