Skip to content

Instantly share code, notes, and snippets.

View AbdullahAlAsad's full-sized avatar
🟢
Working. . .

Abdullah Al Asad AbdullahAlAsad

🟢
Working. . .
View GitHub Profile
@AbdullahAlAsad
AbdullahAlAsad / DateUtils.kt
Created June 6, 2022 06:26 — forked from nowfalsalahudeen/DateUtils.kt
DateUtils-kotlin
import android.annotation.SuppressLint
import java.math.BigDecimal
import java.sql.Timestamp
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.regex.Pattern
/**
@AbdullahAlAsad
AbdullahAlAsad / .yaml
Last active March 15, 2021 16:50
light_api_oas3
openapi: 3.0.0
info:
description: 'A prototype API to control light on seapod'
version: 1.0.0.0
title: 'light control api'
termsOfService: "https://oceanbuilders.com/terms/"
contact:
email: "apiteam@oceanbuilders.com"
license:
name: "Apache 2.0"
@AbdullahAlAsad
AbdullahAlAsad / git-feature-workflow.md
Created October 30, 2019 04:44 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@AbdullahAlAsad
AbdullahAlAsad / CurvedShape.dart
Created October 21, 2019 10:47 — forked from tarek360/CurvedShape.dart
Draw a curved shape in Flutter
import "package:flutter/material.dart";
import 'package:flutter/services.dart';
import 'dart:math';
const CURVE_HEIGHT = 160.0;
const AVATAR_RADIUS = CURVE_HEIGHT * 0.28;
const AVATAR_DIAMETER = AVATAR_RADIUS * 2;
void main() => runApp(new MyApp());
sudo apt-get update
sudo apt-get -y upgrade
python3 -v
python3.5
sudo apt-get install -y python3-pip
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
sudo apt-get install -y python3-venv
pwd
cd ~
pwd
@AbdullahAlAsad
AbdullahAlAsad / The Technical Interview Cheat Sheet.md
Created November 2, 2017 02:46 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@AbdullahAlAsad
AbdullahAlAsad / install-tomcat-8.5.14.sh
Created October 29, 2017 03:14 — forked from Clivern/install-tomcat-8.5.14.sh
How to Install Apache Tomcat 8 on Ubuntu 16.04
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip
sudo unzip apache-tomcat-8.5.15.zip
sudo mv apache-tomcat-8.5.15 tomcat
@AbdullahAlAsad
AbdullahAlAsad / ItemClickSupport.java
Created March 13, 2017 07:25 — forked from nesquena/ItemClickSupport.java
Click handling for RecyclerView
/*
Source: http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/
USAGE:
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
// do it
}
});
@AbdullahAlAsad
AbdullahAlAsad / ActivityA.java
Created March 3, 2017 03:15
Stackoverflow answer, "Singleton in Android"
package com.example.testSingleton;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
public class ActivityA extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {