This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$wilayah = [ | |
// nama desa | |
'desa' => "Sukaluyu", | |
// nama kecamatan | |
'kecamatan' => "Tamansari", | |
// nama kabupaten | |
'kab_kota' => "Bogor", | |
// nama provinsi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\image\Entity\ImageStyle; | |
use Drupal\file\Entity\File; | |
/** | |
* ================================================================ | |
* Implements hook_drush_command(). | |
* ---------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//set printing option to raw | |
$tmpdir = sys_get_temp_dir(); # ambil direktori temporary untuk simpan file. | |
$file = tempnam($tmpdir, 'ctk'); # nama file temporary yang akan dicetak | |
$handle = fopen($file, 'w'); | |
$condensed = Chr(27) . Chr(33) . Chr(4); | |
$bold1 = Chr(27) . Chr(69); | |
$bold0 = Chr(27) . Chr(70); | |
$initialized = chr(27).chr(64); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~~~ | |
apt-get -y install php7.0-opcache php7.0-fpm php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-pgsql php7.0-imap php7.0-cli php7.0-cgi php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring | |
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
$ sudo chown -R USER:www-data storage/logs | |
$ sudo chmod -R ug+rw storage/logs | |
$ sudo chown -R USER:www-data storage/framework | |
$ sudo chmod -R ug+rw storage/framework | |
$ sudo chown -R USER:www-data bootstrap/cache/ | |
$ sudo chmod -R ug+rw bootstrap/cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Seeder; | |
class DatabaseSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LANGUAGE=en_US.UTF-8 \ | |
export LC_ALL=en_US.UTF-8 \ | |
export LANG=en_US.UTF-8 \ | |
export LC_TYPE=en_US.UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~~~ | |
---------------------------------------------------------------------------------------------------------------------------------+ | |
| users | CREATE TABLE `users` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`role_id` int(10) unsigned DEFAULT NULL, | |
`remember_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`created_at` timestamp NULL DEFAULT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~~~ | |
$table->unique(['product_id', 'company_id', 'price', 'delivery_hours'], | |
'prices_history_index_unique'); | |
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~~~ | |
>>> $user = New App\User; | |
=> App\User {#812} | |
>>> $user->name = 'admin'; | |
=> "admin" | |
>>> $user->email='admin@example.com'; | |
=> "admin@dev.bantenprov.go.id" | |
>>> $user->password = Hash::make('admin'); | |
=> "$1" | |
>>> $user->save(); |
NewerOlder