Skip to content

Instantly share code, notes, and snippets.

View stevebaros's full-sized avatar
🎧
Yes am available

Stephen Barungi stevebaros

🎧
Yes am available
View GitHub Profile
@stevebaros
stevebaros / emoji_cheat_sheet.json
Created December 31, 2016 13:20 — forked from jnwelzel/emoji_cheat_sheet.json
Emoji cheat sheet
{
PEOPLE: [":smile:",":laughing:",":blush:",":smiley:",":relaxed:",":smirk:",":heart_eyes:",":kissing_heart:",":kissing_closed_eyes:",":flushed:",":relieved:",":satisfied:",":grin:",":wink:",":stuck_out_tongue_winking_eye:",":stuck_out_tongue_closed_eyes:",":grinning:",":kissing:",":kissing_smiling_eyes:",":stuck_out_tongue:",":sleeping:",":worried:",":frowning:",":anguished:",":open_mouth:",":grimacing:",":confused:",":hushed:",":expressionless:",":unamused:",":sweat_smile:",":sweat:",":disappointed_relieved:",":weary:",":pensive:",":disappointed:",":confounded:",":fearful:",":cold_sweat:",":persevere:",":cry:",":sob:",":joy:",":astonished:",":scream:",":tired_face:",":angry:",":rage:",":triumph:",":sleepy:",":yum:",":mask:",":sunglasses:",":dizzy_face:",":imp:",":smiling_imp:",":neutral_face:",":no_mouth:",":innocent:",":alien:",":yellow_heart:",":blue_heart:",":purple_heart:",":heart:",":green_heart:",":broken_heart:",":heartbeat:",":heartpulse:",":two_hearts:",":revolving_hearts:",":cupid:",":sparkling_
@stevebaros
stevebaros / PHP Countries Array
Created April 25, 2017 12:04 — forked from DHS/PHP Countries Array
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island

Keybase proof

I hereby claim:

  • I am stevebaros on github.
  • I am stevebaros (https://keybase.io/stevebaros) on keybase.
  • I have a public key whose fingerprint is E37D 2E73 91B1 050E F3E0 8BB7 7496 6850 BED3 0C3A

To claim this, I am signing this object:

@stevebaros
stevebaros / RestControllerTrait.php
Created December 5, 2019 11:59 — forked from Idnan/ RestControllerTrait.php
Laravel Lumen: RESTful trait
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait {
public function index() {
$model = self::MODEL;
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSubReferenceToFormSubmissionsTable extends Migration
{
/**
* Run the migrations.
@stevebaros
stevebaros / php_java_developer_books_to_read
Created March 2, 2020 12:46
Want to become a PHP and Java pro ? then read these books
Modern PHP (by Josh Lockhart)
Scaling PHP Apps (by Steve Corona)
Modular Programming with PHP 7 (by Branko Ajzele)
PHP the right way (by Josh Lockhart and the PHP community)
Mastering PHP Design Patterns (by Junade Ali)
Design Patterns (by GoF)
Head First Design Patterns (by Elisabeth Freeman and Kathy Sierra)
Software Architecture Patterns (by Mark Richards)
Patterns of Enterprise Application Architecture (by Martin Fowler)
The Clean Coder (by Robert Martin)
@stevebaros
stevebaros / digdag.md
Last active May 11, 2020 13:51 — forked from hiroyuki-sato/digdag.md
digdag embulk example - Move Large volumes of data using Embulk from any data store to another.

hoge.dig

timezone: UTC

_export:
  my_path: "/tmp/hoge/csv"

+step1:
@stevebaros
stevebaros / gist:cccb3781343b9015dbf802f6f591ea2d
Created October 12, 2017 10:19 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@stevebaros
stevebaros / axios-response-interceptor.js
Created August 30, 2020 07:45 — forked from FilipBartos/axios-response-interceptor.js
Axios response interceptor for access token refresh supporting 1 to N async requests
let isAlreadyFetchingAccessToken = false
let subscribers = []
function onAccessTokenFetched(access_token) {
subscribers = subscribers.filter(callback => callback(access_token))
}
function addSubscriber(callback) {
subscribers.push(callback)
}
@stevebaros
stevebaros / .php_cs.dist
Created September 30, 2020 18:23 — forked from Billz95/.php_cs.dist
A Customised fixer for PHP-CS-Fixer to use `prettier`'s php plugin to pre-process the code before getting analysed by other fixers. This would enable `php-cs-fixer` to take advantage of `prettier`'s ability of managing long line.
<?php
require_once __DIR__.'/relative/path/to/PrettierPHPFixer/File';
return PhpCsFixer\Config::create()
->registerCustomFixers([
(new PrettierPHPFixer()),
])
->setRules([
'Prettier/php' => true,