Skip to content

Instantly share code, notes, and snippets.

All roses are not flower, where did you put Royce?

Hammed Oyedele devhammed

All roses are not flower, where did you put Royce?
View GitHub Profile
devhammed / statelessful.dart
Created May 26, 2021
Flutter Statelessful widget (inline stateful widgets)
View statelessful.dart
import 'package:flutter/material.dart';
class Statelessful<T> extends StatefulWidget {
final T Function() initialState;
final Widget Function(
BuildContext context,
T state,
void Function(T state) setState,
) builder;
devhammed / brainfuck.go
Last active Jan 18, 2021
Brainfuck Interpreter in 98 lines of Go!
View brainfuck.go
package main
import (
func usage() {
fmt.Printf("BrainFuck Usage: %s\r\n", os.Args[0])
devhammed / countries.json
Created Oct 17, 2020
Countries with Name, Dial Code, Emoji Flag and ISO Code
View countries.json
"name": "Afghanistan",
"flag": "🇦🇫",
"code": "AF",
"dial_code": "+93"
"name": "Åland Islands",
"flag": "🇦🇽",
devhammed / 00-app-Exceptions-Handler.php
Last active Aug 12, 2020
Laravel API Essentials...this is the base configuration I use for Laravel API and React frontend.
View 00-app-Exceptions-Handler.php
namespace App\Exceptions;
use Throwable;
use Illuminate\Support\Arr;
use Illuminate\Http\JsonResponse;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;

Creating deb packages to deploy applications in Debian or Ubuntu is a fairly simple process. However, I have found that the majority of existing documentation for doing so is overly verbose or more complex than needed. This writeup aims to summaries the process of creating deb packages in just a few simple steps.

Here is a short summary of what this writeup covers:

  • How to create a bare bones deb package
  • How to optionally add package configuration files
  • How to optionally add package dependancies
  • How to optionally add package scripts that run before or after installation

Create a Build Directory

devhammed /
Created Jul 7, 2020
MacOS DMG Installers Downloader
#!/usr/bin/env python
# encoding: utf-8
# Copyright 2017 Greg Neagle.
# 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
devhammed / build-and-release.yml
Last active Jan 6, 2022
GitHub Actions workflow to build Flutter app and create Release, put this file under `.github/workflows` folder.
View build-and-release.yml
- master
name: Build and Release Apps
name: Build Apps
runs-on: macos-latest
devhammed / countries-iso.json
Last active Jan 29, 2020
ISO code of Countries in the world, I also attached a simple JavaScript function that is able to convert the code to the country's flag emoji 🔥🔥🔥
View countries-iso.json
"code": "AD",
"label": "Andorra"
"code": "AE",
"label": "United Arab Emirates"
devhammed / update-fork
Last active Jan 15, 2020
Update forked Repositories, works for any Git repository e.g GitHub, GitLab, BitBucket etc.
View update-fork
#!/usr/bin/env bash
# The branch (defaults to master) to update,
# can be the first parameter if there is upstream remote already
# Check if there is no existing 'upstream' remote repo
if [[ ! "$(git remote)" =~ "upstream" ]]; then
# Add upstream remote repo
git remote add upstream "$1"