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
--
-- Table structure for table `country_t`
--
CREATE TABLE IF NOT EXISTS `country_t` (
`country_id` int(5) NOT NULL AUTO_INCREMENT,
`iso2` char(2) DEFAULT NULL,
`short_name` varchar(80) NOT NULL DEFAULT '',
`long_name` varchar(80) NOT NULL DEFAULT '',
`iso3` char(3) DEFAULT NULL,
@elishaukpong
elishaukpong / getMenuHierarchically.md
Created May 19, 2019 13:32 — forked from vwasteels/getMenuHierarchically.md
Retrieve menu items hierarchically in Wordpress
/**
 * Get Menu Items From Location
 *
 * @param $location : location slug given as key in register_nav_menus
 */

function getMenuItemsFromLocation($location) {
	$theme_locations = get_nav_menu_locations();
@elishaukpong
elishaukpong / sendy-server
Created January 9, 2020 14:13 — forked from refringe/sendy-server
Nginx configuration file example for Sendy (http://sendy.co/).
server {
listen 80;
listen [::]:80;
server_name domain.com;
autoindex off;
index index.php index.html;
root /srv/www/domain.com/public;
@elishaukpong
elishaukpong / sendy.conf
Created January 9, 2020 14:13 — forked from saaiful/sendy.conf
Nginx configuration file example for Sendy (http://sendy.co/).
server {
listen ip:port;
server_name domain.name;
root root_folder;
index index.php index.html index.htm;
location / {
location = / {
try_files $uri $uri/ /index.php?$query_string;
}
@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>
# 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
// 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);
@elishaukpong
elishaukpong / DOSpacesStorageServiceProvider.php
Created September 22, 2021 23:18 — forked from m2sh/DOSpacesStorageServiceProvider.php
How To Use Digitalocean Spaces as Laravel Cloud filesystems
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;