Skip to content

Instantly share code, notes, and snippets.

View webong's full-sized avatar
:octocat:
Working from home

Wisdom Ebong webong

:octocat:
Working from home
View GitHub Profile
@webong
webong / slack_invite.php
Created April 29, 2018 12:25 — forked from Topener/slack_invite.php
Simple PHP script to invite slack users
<?php
/**
* This is a simple script to invite users to your slack
* Replace the subdomain and token in the variables below.
* Upload a logo called "logo.png" to the same directory for your group
* Upload a logo called "slack.png" to the same directory for slack
*/
define('SUBDOMAIN','{YOUR SUBDOMAIN HERE}');
define('TOKEN','{YOUR API TOKEN HERE}');
?>
@webong
webong / media-query.css
Created July 11, 2018 11:10 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@webong
webong / messengerbot.md
Created September 16, 2018 18:36
Integrate Facebook Live Chat with bot support from chatfuel.com on your website

MessengerChat

Integrate Facebook Live Chat with bot support from chatfuel.com on your website

What is a Live Chat

Live chat provides a rapid communication with your website visitors via instant messaging. The chat simply appears within their browser window, and the website visitor can chat with an operator by typing into the live chat box.

Solutions that offers Live chat features include Intercom,Drift e.t.c

Tutorial

A Facebook Page will serve as a Customer Relationship Management which we will build our Live Chat Support upon using Messenger.

@webong
webong / Wisdom.md
Created January 18, 2019 00:10 — forked from bosunski/Wisdom.md

The Lucid Architecture for Laravel was introduced by Abed Halawi in one of the Laracon event and it grants a laravel app a good way to scale the app in terms of the development flexibility. The architecture follows a Domain Driven design approach.

However, even though Lucid Architecture provides a way you can create a fresh project with Lucid, it's quite difficult to implement on an already running project that wants to try out the Structure. the purpose of this article is to take you through how we can still use Lucid in a well ordered manner without it affecting you app initial setup.

This post is written for as many who will like to implement this clear and simple architecture in their laravel project.

We're going to achieve this in few steps, so follow me tightly:

@webong
webong / deployment_guide.md
Created May 6, 2019 19:15 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel

Setting Up Laravel in Ubuntu / DigitalOcean

Getting Started

  • Create droplet with Ubuntu 18.10
  • ssh root@[DROPLET IP ADDRESS]
  • Get password from your email
  • Change password on first login
  • adduser laravel
  • Enter password and other information
@webong
webong / GuzzleRequestHandler.php
Last active October 30, 2019 16:42
Log Guzzle Requests in Laravel
<?php
declare(strict_types=1);
namespace App\Helpers;
use Exception;
use Psr\Log\LogLevel;
use Psr\Log\LoggerInterface;
use GuzzleHttp\TransferStats;
@webong
webong / reverse.js
Created March 25, 2020 18:15
Funtion to Reverse a Sentence
function reverseSentence(sentence) {
var splitSentence = sentence.trim().split(" ");
var newSentence = [];
for (var i = 0, j = splitSentence.length; i < j; i++) {
newSentence.push(splitSentence[i].split("").reverse().join(""));
}
return newSentence.join(" ");
}
@webong
webong / gmail.php
Created March 31, 2020 16:12
Connect to GMAIL datasource
<?php
require __DIR__ . '/../vendor/autoload.php';
if (php_sapi_name() != 'cli') throw new Exception('This application must be run on the command line.');
$source = new GMailDataSource();
try {
dd($source->fetch());
} catch (Google_Exception $e) {
@webong
webong / GSOC.md
Last active September 7, 2020 16:22
GSOC 2020: Ushahidi Gmail Data Source

Introduction

The Ushahidi platform has made a huge impact on the aspect of social activism and citizen journalism by enabling observers to submit reports via their phones or the internet. A way of using the internet to send reports is via the email service and GMail happens to be the most used data provider.

About the Project

This project aims to introduce Gmail support into the Ushahidi Platform code, as its own specific data source. This is done by interacting with the Gmail service using its API, ensuring better support and integration with the service.

Technologies Used

The primary technology used is the PHP language and the Gmail API service

/**
*Submitted for verification at Etherscan.io on 2018-06-22
*/
pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {