Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
Yes am available Fork me & raise a PR

stevebaros

🎧
Yes am available Fork me & raise a PR
View GitHub Profile
@stevebaros
stevebaros / .php_cs.dist
Created Sep 30, 2020 — 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.
View .php_cs.dist
<?php
require_once __DIR__.'/relative/path/to/PrettierPHPFixer/File';
return PhpCsFixer\Config::create()
->registerCustomFixers([
(new PrettierPHPFixer()),
])
->setRules([
'Prettier/php' => true,
@stevebaros
stevebaros / axios-response-interceptor.js
Created Aug 30, 2020 — forked from FilipBartos/axios-response-interceptor.js
Axios response interceptor for access token refresh supporting 1 to N async requests
View axios-response-interceptor.js
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_java_developer_books_to_read
Created Mar 2, 2020
Want to become a PHP and Java pro ? then read these books
View php_java_developer_books_to_read
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 — forked from hiroyuki-sato/digdag.md
digdag embulk example - Move Large volumes of data using Embulk from any data store to another.
View digdag.md

hoge.dig

timezone: UTC

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

+step1:
View 2019_12_16_162708_add_sub_reference_to_form_submissions_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSubReferenceToFormSubmissionsTable extends Migration
{
/**
* Run the migrations.
View RestControllerTrait.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait {
public function index() {
$model = self::MODEL;
View keybase.md

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 / gist:cccb3781343b9015dbf802f6f591ea2d
Created Oct 12, 2017 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
View gist:cccb3781343b9015dbf802f6f591ea2d
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@stevebaros
stevebaros / PHP Countries Array
Created Apr 25, 2017 — forked from DHS/PHP Countries Array
PHP array of all country names
View PHP Countries Array
<?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
View emoji_cheat_sheet.json
{
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_