Skip to content

Instantly share code, notes, and snippets.

View poing's full-sized avatar

Brian LaVallee poing

View GitHub Profile
@poing
poing / odbc.ini
Last active February 20, 2018 14:10
odbc.ini for MySQL/MariaDB on AWS w/ SSL
# Ref: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
#
# A certificate bundle that contains both the old and new root certificates can be
# downloaded at https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem .
[aws]
Description = MySQL/MariaDB on AWS
Driver = MySQL
Database = DATABASE
#
@poing
poing / loway.md
Last active January 17, 2018 02:00

Final Draft

Asterisk IVR: Inbound Calling is Easy; Outbound Calling is Hard

Whether it's a regular election or the Prime Minister of Japan calls for a snap election. To capitalize on an electoral opportunity or decide on some pressing social issue. Polling gives political candidates a picture of where they stand with the electorate.

Voter opinions shift from week to week, even day to day, as the candidates battle it out. Socio Diversity Co., Ltd. conducts telephone based data collection efforts to paint this picture.

Socio partnered with INVITE Communications Co., Ltd. to provide the communications platform, infrastructure, and development of an Asterisk based telephone survey system.

@poing
poing / css-to-do-checklist-with-comments-draft.markdown
Last active February 12, 2018 15:48
CSS To-Do Checklist (with comments Draft)

CSS To-Do Checklist (with comments Draft)

Updated with editing capabilities powered by jQuery. Pretty rough code-wise, but the UI is decent!

A Pen by Brian LaVallee on CodePen.

License.

@poing
poing / afterhours-icingaadmin.notification.log
Created June 16, 2018 01:21
icinga2-notification Issue
Object 'INVTTMTJTEST!afterhours-icingaadmin' of type 'Notification':
% declared in '/etc/icinga2/zones.d/master/notifications.conf', lines 23:1-23:51
* __name = "INVTTMTJTEST!afterhours-icingaadmin"
* command = "mail-host-notification"
% = modified in '/etc/icinga2/zones.d/master/templates.conf', lines 72:3-72:36
* command_endpoint = ""
* host_name = "INVTTMTJTEST"
% = modified in '/etc/icinga2/zones.d/master/notifications.conf', lines 23:1-23:51
* interval = 1800
* name = "afterhours-icingaadmin"
left right
survey.name survey.project
users.username survey_details.extension
survey.description survey.created
question response
survey_questions.question_label: survey_questions.prompt survey_questions_dtmf.dtmf_value (survey_questions_dtmf.dtmf)

Test parameters:

--iterations=2 --concurrency=6 --iterations=1000


Using view without indexes: It took over 30 minutes to run the benchmark test.

Benchmark
@poing
poing / laravel_facades.md
Last active March 25, 2024 21:37
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@poing
poing / embed.php
Last active February 1, 2019 04:36
<?php
class Embeded
{
public function test()
{
echo 'embeded test';
}
}
<?php
namespace Vendorname\Projectname\Some\Long\Path;
class Cats
{
public function sound() { return 'meow'; }
}
<?php
namespace App\Http\Controllers;
class Dogs extends Controller
{
public function sound() { return 'bark'; }
}