Skip to content

Instantly share code, notes, and snippets.

View phunguyen19's full-sized avatar

Raymond Phu Nguyen phunguyen19

View GitHub Profile
@phunguyen19
phunguyen19 / class_decorator.ts
Last active June 10, 2022 14:30 — forked from remojansen/class_decorator.ts
typescript decorators
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@phunguyen19
phunguyen19 / citations
Created March 18, 2019 03:34 — forked from bussiere/citations
citations quote informatic informatique quotes computer science
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
“In order to understand recursion, one must first understand recursion.” – Author Unknown
“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.” – Bjarne Stroustrup
“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila.” – Mitch Ratcliffe
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -C.A.R. Hoare
“The gap between theory and practice is not as wide in theory as it is in practice.” – Author Unknown
“If builders built buildings the way progra
@phunguyen19
phunguyen19 / SerializerWithPager.php
Last active June 10, 2022 13:42 — forked from shadcn/SerializerWithPager.php
drupal 8 View plugin Serializer with paging
<?php
namespace Drupal\MODULE_NAME\Plugin\views\style;
use Drupal\rest\Plugin\views\style\Serializer;
/**
* The style plugin for serialized output formats with pager.
*
* @ingroup views_style_plugins
@phunguyen19
phunguyen19 / install-php7-extensions.sh
Created September 27, 2017 04:48 — forked from Jacksgong/install-php7-extensions.sh
linux ubuntu install php7 and neccessary extensions
sudo apt install php7.0-common php7.0-fpm php7.0-cli php7.0-json php7.0-mysql php7.0-curl php7.0-intl php7.0-mcrypt php-pear php7.0-gd php7.0-zip php7.0-xml php7.0-mbstring