Skip to content

Instantly share code, notes, and snippets.

View permatis's full-sized avatar

defri permatis

  • Indonesia
View GitHub Profile
@permatis
permatis / app.php
Created April 27, 2015 05:18
Create setting SwiftMailer in Slim Framework.
$app->mailer = function () {
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', '465', 'ssl')
->setUsername('[email protected]')
->setPassword('password');
$mailer = Swift_Mailer::newInstance($transport);
return $mailer;
};
@permatis
permatis / replace_mutidotted.php
Last active August 29, 2015 14:19
This function for replace multidotted with string in array.
<?php
//Example array subject
$array1 = [
'Name',
': ...',
'Tab',
'Semarang, ........'
];
@permatis
permatis / project.sql
Last active August 29, 2015 14:09
Menampilkan hasil pendapatan pegawai dan per project.
mysql> create table if not exists kontributor (id int not null auto_increment, nama varchar(45), primary key(id));
Query OK, 0 rows affected (0.10 sec)
mysql> create table if not exists project ( id int not null auto_increment, namaproject varchar(45), biaya int, primary key(id));
Query OK, 0 rows affected (0.46 sec)
mysql> create table if not exists relasi_kontributor ( kontributor_id int not null, project_id int not null
-> );
Query OK, 0 rows affected (0.45 sec)