Skip to content

Instantly share code, notes, and snippets.

View uchilaka's full-sized avatar

Uchenna Chilaka uchilaka

View GitHub Profile
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.
@uchilaka
uchilaka / docker-compose.yaml
Created January 5, 2018 21:12
Wordpress In Docker
version: '2'
services:
db:
container_name: wp-mysql
ports:
- 8086:3306
image: mysql/mysql-server:5.7
restart: unless-stopped
@uchilaka
uchilaka / Froxlor_Ubuntu_16.04.md
Last active January 29, 2018 01:34
Building Froxlor on Ubuntu 16.04

Setting up source repo for Froxlor

touch /etc/apt/sources.list.d/froxlor.list
echo 'deb http://debian.froxlor.org stable main' > /etc/apt/sources.list.d/froxlor.list

Installing PHP 5.6 on Ubuntu 16.04

sudo add-apt-repository ppa:ondrej/apache2
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update && sudo apt-get upgrade
@uchilaka
uchilaka / README.md
Last active January 29, 2018 09:35
Domain Checklist for custom mail server built on DigitalOcean
@uchilaka
uchilaka / .eslintrc.js
Last active October 5, 2020 13:28
A Google Cloud Function that acts on new Storage File objects, extracts EXIF data using ImageMagick and parses out text content using the Google Cloud Vision API
module.exports = {
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
modules: true,
//experimentalObjectRestSpread: true
}
},
@uchilaka
uchilaka / OddsAndEvens.java
Last active June 21, 2018 20:55
Java code for OddsAndEvens assignment on **Microsoft: DEV276x**
package com.uchechilaka.examples;
import java.util.Random;
import java.util.Scanner;
class Player {
public String name;
public String choice;
public int numberOfFingers;
@uchilaka
uchilaka / settings.json.js
Last active July 26, 2018 05:22
My ideal vscode config
{
"workbench.colorTheme": "One Dark Pro Monokai Darker",
"files.autoSave": "onFocusChange",
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.formatOnSave": true,
"eslint.autoFixOnSave": true,
"markdown.extension.preview.autoShowPreviewToSide": true,
"markdown.preview.scrollPreviewWithEditor": true,
"less.compile": {
@uchilaka
uchilaka / ViewController.swift
Last active August 28, 2018 19:34
Fixing alignment issues with native popup view controllers
import UIKit
class ViewController: UIViewController {
// Some other code...
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// The next 3 lines of code will apply the fix IF a view controller is being presented as a popup, to align it to the center of the anchor object's view
if let popoverPresentationController = segue.destination.popoverPresentationController, let sourceView = sender as? UIView {
popoverPresentationController.sourceRect = sourceView.bounds;
@uchilaka
uchilaka / getting-started.md
Last active November 6, 2018 17:49
Zero to app with OpenShift

Getting Started (FAST!) with OpenShift

This guide will be completed with the OpenShift Trial available at https://www.openshift.com/trial/. Our link here directs you right to the signup screen for a developer trial - if you visit the link directly, be sure to select the developer track.

Complete the following steps to get going with an OpenShift trial account:

  1. Create a Red Hat account. You can also login with your Google account (which is what I did). You will be directed to:
    • Provide a password
    • Agree to the disclosures You will end up at an account dashboard letting you know that your environment is queued for provisioning. No worries - you've got a Red Hat account, so your job is done here for now. Head back to the getting started guide.
@uchilaka
uchilaka / Manage_Mac_OSX_Upgrade_Notification.md
Last active February 15, 2019 17:15
Manage Mac OSX Upgrade Notifications