Skip to content

Instantly share code, notes, and snippets.

View asika32764's full-sized avatar

Simon Asika asika32764

View GitHub Profile
@asika32764
asika32764 / Install Composer using MAMP's PHP.md
Created February 8, 2018 12:39 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@asika32764
asika32764 / joomla-often-used-events.php
Last active April 29, 2019 06:25
Joomla often used events example
<?php
/**
* @package {ORGANIZATION}.Plugin
* @subpackage system.plg_flower
* @copyright Copyright (C) 2012 {ORGANIZATION}.com, Inc. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
<?php
$filename = 'pdf-download';
$options = new \Dompdf\Options;
$options->set('isRemoteEnabled', true);
$dompdf = new \Dompdf\Dompdf($options);
$dompdf->set_option('defaultFont', 'droidsansfallback');
$dompdf->set_option('isFontSubsettingEnabled', true);
@asika32764
asika32764 / luna-warder-1.2.md
Created June 19, 2017 03:42
Luna & Warder 1.2 新增功能

Luna & Warder 1.2 新增功能

Luna 1.2

新增 Contact

170619-0001

前後台新增 error_extends 設定

use Windwalker\Uri\Uri;
/**
* The AsyncRequest class.
*
* @since {DEPLOY_VERSION}
*/
class AsyncRequest
{
/**
function AjaxHelper() {
this.ajax = function(url, type, dataType, data, callback) {
$.ajax({
url: url,
type: type,
dataType: dataType,
data: data,
success: callback,
error: function(xhr, errorType, error) {
alert('Ajax request error, errorType: ' + errorType + ', error: ' + error)
@asika32764
asika32764 / auto-deploy.md
Created July 6, 2016 06:49 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@asika32764
asika32764 / spinner.rb
Created June 24, 2016 01:01 — forked from ellemenno/spinner.rb
ascii spinner
#!/usr/bin/env ruby
# encoding: UTF-8
@dot_cycle = ['⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷']
#braille random: 0x2800 - 0x28ff
@z_arrow = ['←','↖','↑','↗','→','↘','↓','↙']
@z_b = ['b','ᓂ','q','ᓄ']
@z_d = ['d','ᓇ','p','ᓀ']
<?php
/**
* Part of ihealth project.
*
* @copyright Copyright (C) 2011 - 2014 SMS Taiwan, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
use Windwalker\Data\Data;
@asika32764
asika32764 / README.md
Last active April 30, 2017 14:11
DataMapper with Entity

p-2016-05-23-006

p-2016-05-23-005

p-2016-05-23-004