Skip to content

Instantly share code, notes, and snippets.

View natintosh's full-sized avatar
🚀

Ogunye Nathaniel Oluwatobiloba natintosh

🚀
View GitHub Profile
@natintosh
natintosh / index.html
Created November 17, 2017 14:13
Nathaniel@me
<div class="wrapper">
<div class="box">
<!-- Beginning of top navigation -->
<div class="row row-offcanvas">
<div class="column col-lg-12 col-xs-12 col-sm-12 col-md-12" id="main">
<div class="navbar navbar-blue navbar-static-top">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle</span>
<span class="icon-bar"></span>
@natintosh
natintosh / index.html
Created November 17, 2017 14:13
Pomodoro Clock
<div class="container">
<div id="clock-bg">
<p>
<p>Break:</p>
<button onclick="subtractBreak()" class="negative-btn">-</button>
<span id="break" class="time-bg">5</span>
<button onclick="addBreak()" class="positive-btn">+</button>
</p>
<p>
<p>Timer:</p>
@natintosh
natintosh / index.html
Created November 17, 2017 14:14
Simon Game
<div class="container">
<div class="headline">Simon Game</div>
<div class="line">
<div id="start" class="button">Start</div>
<div class="steps">Steps</div><div id="stepsCount">00</div>
<div id="strict" class="button">Strict</div>
</div>
<div class="box">
<div id="green" class="greenSquare">&nbsp;</div>
@natintosh
natintosh / index.html
Created November 17, 2017 14:14
Tic Tac Toe
<div class="container">
<div class="board">
<div> Choose your symbol: </p><button class="symbol-x-btn" onclick="setSym('x')">x</button> <button class="symbol-o-btn" onclick="setSym('o')">o</button></div>
<table>
<tr>
<td onclick="enter(1)" id="1"></td>
<td onclick="enter(2)" id="2"></td>
<td onclick="enter(3)" id="3"></td>
</tr>
<tr>
@natintosh
natintosh / index.html
Created November 17, 2017 14:14
Javascript Calculator
<div class="container">
<div class="cal-bg">
<div class="disp-container">
<div id="cal-disp">0</div>
</div>
<div>
<table class="container">
<tr>
<td colspan="2">
<button onclick="cancel()" class="btn"> CE </button>
@natintosh
natintosh / index.html
Created November 17, 2017 14:14
Wikipedia Viewer
<div><div class="text-box"><i class="fa fa-random icon-search" onclick="randomWiki()"></i>
<input type="text" id="query" placeholder="search"/>
<button id="search"><i class="fa fa-search icon-search"></i></button>
</div>
</div>
<div id="results"></div>
import 'package:flutter/services.dart';
import 'package:string_mask/string_mask.dart';
class PhoneMaskInputFormatter extends TextInputFormatter {
final String mask;
final String escapeChar;
final RegExp regExp = RegExp(r'[^\d]+');
Map<int, String> _separatorMap;
@natintosh
natintosh / phone_format_as_you_type.dart
Created December 16, 2019 09:09
A class formats phone number input as you type
typedef OnInputFormatted<T> = void Function(T value);
class PhoneFormatter extends TextInputFormatter {
final RegExp separatorChars = RegExp(r'[^\d]+');
final RegExp allowedChars = RegExp(r'[\d+]');
final String isoCode;
final String dialCode;
final OnInputFormatted<TextEditingValue> onInputFormatted;
// 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';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
void main() {
print(resistorColor('Red'));
}
const List<String> colors = [
'Black',
'Brown',
'Red',
'Orange',
'Yellow',