Skip to content

Instantly share code, notes, and snippets.

View samsonasik's full-sized avatar
🔥
I am doing very fast fix 🚀, sponsor me 💖 https://github.com/sponsors/samsonasik

Abdul Malik Ikhsan samsonasik

🔥
I am doing very fast fix 🚀, sponsor me 💖 https://github.com/sponsors/samsonasik
View GitHub Profile
@samsonasik
samsonasik / composer.json
Created June 10, 2016 12:49 — forked from harikt/composer.json
Get all the contributors from the repos of an organization
{
"require": {
"guzzlehttp/guzzle": "4.*"
}
}
@samsonasik
samsonasik / config
Created September 8, 2016 09:01 — forked from donnfelker/config
Watch or Unwatch a file in git
# Goes in your .git/config file
[alias]
# Temporarily stop tracking a file in git.
# usage: git unwatch path/to/file
unwatch = update-index --assume-unchanged
# Resume tracking a file in git.
# usage: git watch path/to/file
watch = update-index --no-assume-unchanged
@samsonasik
samsonasik / barcode.php
Last active August 11, 2022 02:43
barcode save download
<?php
// ...
public function barcodeAction()
{
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
$barcode = \Zend\Barcode\Barcode::factory('code39', 'Image', $barcodeOptions);
//temporary save file into data folder
imagegif($barcode->draw(), './data/barcode.gif');
@samsonasik
samsonasik / cara-penggunaan-codeigniter-coding-standard.md
Created August 30, 2021 00:55
cara penggunan codeigniter coding standard
@samsonasik
samsonasik / symfony-tips1-prod-dev.md
Last active April 5, 2021 12:50
symfony tips 1 - switch dev - prod or prod - dev again
@samsonasik
samsonasik / CreateDb.php
Last active March 12, 2020 19:01
create db command with ci 4
<?php namespace App\Commands;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
class CreateDb extends BaseCommand
{
protected $group = 'app';
protected $name = 'app:createdb';
protected $description = 'Create database';
$routes->group('user', [
'filter' => 'permission:manage-user',
'namespace' => 'agungsugiarto\boilerplate\Controllers\Users',
],
function($routes)
{
$routes->get('show', 'UserController::show', ['as' => 'user-show']);
},
function ($routes)
{
@samsonasik
samsonasik / gist:3988701
Created October 31, 2012 17:57
Send HTML Mail Using ZF2
use Zend\Mail\Message;
use Zend\Mail\Transport\Smtp as SmtpTransport;
use Zend\Mime\Message as MimeMessage;
use Zend\Mime\Part as MimePart;
use Zend\Mail\Transport\SmtpOptions;
//////////
$message = new Message();
<?php
class DsnReader
{
private $dsn;
public function __construct($dsn)
{
$this->dsn = $dsn;
}
@samsonasik
samsonasik / gist:4171219
Created November 29, 2012 19:20
set #zf2 in shared hosting ( .htaccess )
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC,OR]
RewriteCond %{REQUEST_URI} !yourapp/public
RewriteRule (.*) /yourapp/public/$1 [L]
place it at your public_html (shared hosting 'root' directory ).
if you call http://yourdomain.com so you will point out to public_html/yourapp/public/index.php