Skip to content

Instantly share code, notes, and snippets.

View joshuachinemezu's full-sized avatar

Joshua Chinemezu joshuachinemezu

View GitHub Profile
@joshuachinemezu
joshuachinemezu / nigerian-states.json
Last active March 27, 2024 01:11
List of states and their LGAs in Nigeria
[{"name":"Abia","cities":[{"name":"Aba North","shipping_cost":10000.00},{"name":"Aba South","shipping_cost":10000.00},{"name":"Arochukwu","shipping_cost":10000.00},{"name":"Bende","shipping_cost":10000.00},{"name":"Ikwuano","shipping_cost":10000.00},{"name":"Isiala Ngwa North","shipping_cost":10000.00},{"name":"Isiala Ngwa South","shipping_cost":10000.00},{"name":"Isuikwuato","shipping_cost":10000.00},{"name":"Obi Ngwa","shipping_cost":10000.00},{"name":"Ohafia","shipping_cost":10000.00},{"name":"Osisioma","shipping_cost":10000.00},{"name":"Ugwunagbo","shipping_cost":10000.00},{"name":"Ukwa East","shipping_cost":10000.00},{"name":"Ukwa West","shipping_cost":10000.00},{"name":"Umuahia North","shipping_cost":10000.00},{"name":"muahia South","shipping_cost":10000.00},{"name":"Umu Nneochi","shipping_cost":10000.00}]},{"name":"Adamawa","cities":[{"name":"Demsa","shipping_cost":10000.00},{"name":"Fufore","shipping_cost":10000.00},{"name":"Ganye","shipping_cost":10000.00},{"name":"Girei","shipping_cost":10000.00},{"
/**
* gpu.js
* http://gpu.rocks/
*
* GPU Accelerated JavaScript
*
* @version 1.0.0-rc.10
* @date Sat Dec 23 2017 10:30:09 GMT-0500 (EST)
*
* @license MIT
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import random
import json
import hashlib
import hmac
import urllib
import uuid
@joshuachinemezu
joshuachinemezu / ssh-file-transfer.sh
Created August 10, 2020 07:31
SSH file transfer using scp
# Transfer file using scp
# The easiest of these are scp or secure copy. While cp is for copying local files, scp is for remote file transfer. The main difference is that with scp you'll have to specify the remote host's DNS name or IP address and provide login credential for the command to work.
# Copy single file from local to remote.
$ scp myfile.txt remoteuser@remoteserver:/remote/folder/
# Copy single file from remote to local.
$ scp remoteuser@remoteserver:/remote/folder/myfile.txt myfile.txt
# Copy multiple files from local to remote.
@joshuachinemezu
joshuachinemezu / macos-dnsmasq.sh
Last active September 11, 2021 10:23
Process for configuring domain wildcard on macos apache
brew install dnsmasq
brew info dnsmasq
sudo brew services start dnsmasq
# For Intel:
nano /usr/local/etc/dnsmasq.conf
# For M1 chip
nano /opt/homebrew/etc/dnsmasq.conf
@joshuachinemezu
joshuachinemezu / http-vhosts.conf
Created June 19, 2020 21:55
Apache Proxy Request to Docker
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
@joshuachinemezu
joshuachinemezu / flutter_loader_with_text.dart
Created June 4, 2020 12:03
Flutter Progress Indicator with Text
import 'dart:async';
import 'package:flutter/material.dart';
class CircularLoadingWidget extends StatefulWidget {
final double height;
final String text;
CircularLoadingWidget({Key key, this.height, this.text: ""})
: super(key: key);
import 'dart:math';
import 'package:flutter/material.dart';
const CURVE_HEIGHT = 250.0;
const AVATAR_RADIUS = CURVE_HEIGHT * 0.28;
const AVATAR_DIAMETER = AVATAR_RADIUS * 2;
class BottomCurvePainter extends CustomPainter {
@override
import 'dart:math';
import 'package:flutter/material.dart';
const CURVE_HEIGHT = 250.0;
const AVATAR_RADIUS = CURVE_HEIGHT * 0.28;
const AVATAR_DIAMETER = AVATAR_RADIUS * 2;
class TopCurvePainter extends CustomPainter {
@joshuachinemezu
joshuachinemezu / python_macos.sh
Created June 3, 2020 10:09
Upgrades macos default python to python3
brew install pyenv
pyenv install 3.7.3
pyenv global 3.7.3
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
source .zshrc