Skip to content

Instantly share code, notes, and snippets.

View elishaukpong's full-sized avatar
🇳🇬
Learning something new somewhere!

Elisha Ukpong elishaukpong

🇳🇬
Learning something new somewhere!
View GitHub Profile
<!--
Copyright 2018 Google Inc.
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
version: '2'
services:
##
# Autodiscovery : Consul
##
autodiscovery:
build: ./autodiscovery/
mem_limit: 128m
expose:
- 53
<?php
/*
* Example code for: PHP 7 Data Structures and Algorithms
*
* Author: Mizanur rahman <mizanur.rahman@gmail.com>
*
*/
class ListNode {
@elishaukpong
elishaukpong / UpCommand.php
Created July 21, 2020 13:30
Bring the application out of maintenance mode
<?php
namespace Illuminate\Foundation\Console;
use Exception;
use Illuminate\Console\Command;
class UpCommand extends Command
{
/**
@elishaukpong
elishaukpong / CheckForMaintenanceMode.php
Last active July 21, 2020 12:08
Laravel's default check for maintenance middleware class
app/Http/Middleware/CheckForMaintenanceMode.php
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
class CheckForMaintenanceMode extends Middleware
{
@elishaukpong
elishaukpong / DownCommand.php
Created July 21, 2020 11:11
Laravel's down command class
<?php
namespace Illuminate\Foundation\Console;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\InteractsWithTime;
class DownCommand extends Command
{
// Remember to bring in three.js and here is the script for the trackball controls as well:
// https://cdn.rawgit.com/mrdoob/three.js/dev/examples/js/controls/TrackballControls.js
//RENDERER
const renderer = new THREE.WebGLRenderer({
canvas: document.getElementById('canvas'),
antialias: true
});
renderer.setClearColor(0x25c8ce);
renderer.setPixelRatio(window.devicePixelRatio);
// PRELOADER
var width = 100,
perfData = window.performance.timing, // The PerformanceTiming interface represents timing-related performance information for the given page.
EstimatedTime = -(perfData.loadEventEnd - perfData.navigationStart),
time = parseInt((EstimatedTime / 1000) % 60, 10) * 100;
var PercentageID = $("#percentage"),
start = 0,
end = 100,
durataion = time;
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915
# worked, but only after I added in line 8
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
gem install rmagick
@elishaukpong
elishaukpong / countrydropdown.html
Created January 11, 2020 15:54 — forked from danrovito/countrydropdown.html
HTML Country Select Dropdown List
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span>
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>