Skip to content

Instantly share code, notes, and snippets.

View william251082's full-sized avatar

William del Rosario william251082

View GitHub Profile
@william251082
william251082 / install-php-amqp.sh
Created March 26, 2021 15:14 — forked from wcomnisky/install-php-amqp.sh
Install PHP AMQp on MacOS
#!/bin/bash
brew search librabbitmq
brew install rabbitmq-c
pecl install amqp
# set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0
# if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121):
@william251082
william251082 / function.php
Created July 2, 2020 07:06 — forked from hlashbrooke/function.php
PHP: Loop through each character in a string
<?php
$str = "String to loop through"
$strlen = strlen( $str );
for( $i = 0; $i <= $strlen; $i++ ) {
$char = substr( $str, $i, 1 );
// $char contains the current character, so do your processing here
}
?>
@william251082
william251082 / sampleREADME.md
Created April 26, 2020 09:19 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@william251082
william251082 / System Design.md
Created April 21, 2020 19:29 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@william251082
william251082 / CronSchedule.php
Created February 12, 2020 21:23 — forked from m4tthumphrey/CronSchedule.php
CronSchedule.php - Allows one to parse a cron expression into human readable text.
<?php
/*
* Plugin: StreamlineFoundation
*
* Class: Schedule
*
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back
* and forth between scheduled moments in time and translating the created schedule back to a human readable form.
*
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format.
Install PHP 5.6 On linux (Debian, Ubuntu, Mint ...)
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
heck Installed PHP Version
php -v
@william251082
william251082 / README.md
Created March 29, 2018 07:04 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@william251082
william251082 / app.js
Created September 8, 2017 11:39
Search Filter KO
var locations= //js objects [{name: 'Park Ave Penthouse'];
var Location = function(data) {
this.name = data.name;
this.visible = ko.observable(true)
};
var ViewModel = function(){
var self = this;
@william251082
william251082 / Knockout Live Search
Created September 6, 2017 08:01 — forked from hinchley/Knockout Live Search
Knockout.js Live Search Example