Skip to content

Instantly share code, notes, and snippets.

View AwsafAlam's full-sized avatar
👨‍💻
Eat. Sleep. Code.

Md Awsaf Alam AwsafAlam

👨‍💻
Eat. Sleep. Code.
View GitHub Profile
// Inputs
var sex = "male" // "male" || "female"
var age = 24 // Age in years
var height = 172 // Height in centimeters
var weight = 75 // Weight in kilograms
var activity_scalar = 1.2 // 1 -> 1.9 (1 being motionless, 1.9 being hugely active)
calculateBMR = function(sex, age, weight, height) {
var bMR = 0;
@AwsafAlam
AwsafAlam / ReadMe.md
Last active January 9, 2019 17:31
Create Web App

This is a basic script for initializing any type of web application quickly.

The script will initialize any application chosen by the user, I did this to make my development process easier and faster. There are a total of 5 options

  1. Custom Boilerplate
  2. Express Application
  3. ReactJS Application
  4. Simple Progressive Web App
  5. Flutter App
https://codepen.io/donnervetter/pen/VjzLgE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;">
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
<body style="padding:0; margin:0">
https://codepen.io/Wujek_Greg/pen/KRXYpg
@AwsafAlam
AwsafAlam / TimerActivity.java
Created July 14, 2018 22:40 — forked from mjohnsullivan/TimerActivity.java
Example of how to create a long running timer service that survives activity destruction by moving to the foreground, and back to the background when a new activity bind to it.
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@AwsafAlam
AwsafAlam / simple-usart-commands.c
Created May 29, 2018 21:38 — forked from adnbr/simple-usart-commands.c
Parsing simple USART commands on an AVR
/* Parsing simple USART commands
* -----------------------------
* For more information see
* http://www.adnbr.co.uk/articles/parsing-simple-usart-commands
*
* 996 bytes - ATmega168 - 16MHz
*/
#define F_CPU 16000000UL
#define BAUD 19200
@AwsafAlam
AwsafAlam / Interrupt.c
Created May 20, 2018 20:13
Interrupt using ATmega
#ifndef F_CPU
#define F_CPU 1000000 // or whatever may be your frequency
#endif
#include <avr/io.h> // adding header files
#include <util/delay.h>
#include <avr/interrupt.h> // for _delay_ms()
volatile unsigned char count=0;
@AwsafAlam
AwsafAlam / Latex_Sites.txt
Created April 22, 2018 21:14
All resources of Latex
1. Share Latex -> https://www.sharelatex.com/
2. Math Symbols -> https://www.sharelatex.com/learn/List_of_Greek_letters_and_math_symbols
@AwsafAlam
AwsafAlam / Linux_Commands.md
Last active May 1, 2018 07:36
These are a list of basic terminal commands in Linux, and will be updated regularly ar new tools are used

Linux command line


Basic Linux commands

  • clear
  • cd ..
  • cd / ( Straight to root directory )
  • cd Desktop/ ( Press Tab for autocomplete )
  • rm Hello.cpp (deletes the file)
  • rmdir NewFolder (deletes the folder)